String conversion


I keep getting an error message whenever I try to make numbers a string. It let me continue to the next lesson, but I am seriously trying to learn so I want to know what I am doing wrong here. I typed exactly as pictured above.

Traceback (most recent call last):
File "python", line 3, in
TypeError: 'str' object is not callable

A question on Explicit String Conversion

impossible to tell without your code


3 print "The value of pi is around " + str(3.14)


ran the code here, everything works fine?


It did indeed work there, but it did not work in the lesson. weird.


You should click on reset code button and then re-type the code. It will work.
You can store str(3.14) in some other variable and then print that variable along with message


Try refreshing the page? Otherwise please post a screenshot of the code in the lesson that produces an error


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.