[Tutor] regarding an error in the programming

Garvit jgarvit912 at gmail.com
Sun Nov 3 05:00:39 EST 2019


Sir/ma’am,
I am a student and learning python as the programming language.
During the execution of a program about ‘pie charts’ an error is occurring i.e. 

“Traceback (most recent call last):
  File "C:\Users\yashmita jain\Desktop\garvit\computer\programs for file\prog 11.py", line 19, in <module>
    plt.pie(Book_price,Book_name,colors=Colours,shadow=True,startangle=140,autopct='%1.1f%%')
  File "C:\Users\yashmita jain\Desktop\garvit\computer\lib\site-packages\matplotlib\pyplot.py", line 2783, in pie
    data is not None else {}))
  File "C:\Users\yashmita jain\Desktop\garvit\computer\lib\site-packages\matplotlib\__init__.py", line 1538, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "C:\Users\yashmita jain\Desktop\garvit\computer\lib\site-packages\matplotlib\axes\_axes.py", line 2964, in pie
    x += expl * math.cos(thetam)
TypeError: can't multiply sequence by non-int of type 'float' “.

How can I correct it? Do response quickly.

Thanking you,
Garvit Jain



More information about the Tutor mailing list