Strings and Console Output - 8. str ()


#1

In the str(pi) example, it was marked as correct, but why doesn't this return "3.14" instead of just 3.14? How would I know this is now a string?


#2

Well, str() will convert to a string. If you don't trust, you can use type:

type(str(pi))

this will tell you it is a string (this is not part of the exercise)


#3

I am having trouble with the fifth_letter = "MONTY" thing!!!!!
i don't know how to do it!


#4

It is confusing
because there is no fifth letter if you start the count of Monty at 0
use "MONTY" [4] and it will work