TypeError: can't multiply sequence by non-int of type 'float' pie chart code example

Example: TypeError: can't multiply sequence by non-int of type 'float'

>>> q0 = '3' 
>>> q1 = (q0 * 1.2) 

Traceback (most recent call last): 
 File "<stdin>", line 1, in <module> 
TypeError: can't multiply sequence by non-int of type 'float'

# To fix this error you need to convert the string to a number first by using the below-mentioned way:

>>> q1 = (float(q0) * 1.2) 
>>> q1 

3.5999999999999996