On topic 16 my_string is not creating..... What to do?


Replace this line with your code.


can you post your code?


On line 3, create the variable my_string and set it to any string you'd like.
On line 4, print the length of my_string.
On line 5, print the .upper() case version of my_string.

and i did

my_string= "Hey this is a string"
print len(my_string)
print my_string.upper()


That looks all good.. In the console, do you see the length of your string and string in upper case? May be try refreshing the whole page and check?


ok....thanx for the help.... :smiley:


Your welcome :slight_smile: does it work, btw?


Can anyone explain why the number 20 is there? I got it to work but i expected the console to spit out.

Hey this is a string


20 is there because it was asked to print the length of the string (20 characters) in line 4.
If you wanted it to print the normal string first change it to: print my_string
Hope that helps