Kindly help me figure out the right syntax


#1



https://www.codecademy.com/courses/python-beginner-sRXwR/4/1?curriculum_id=4f89dab3d788890003000096#


Oops, try again. Did you remember to print len(my_string)?


# Write your code below, starting on line 3!

my_string="stanford"
len("stanford")
print "stanford".upper()


#2

if you need to print something (like the length) use a print statement?


#3

For this one, the variable name is my_string, and the string name is "stanford". To solve this, the argument () you want to enter inside for len() is the variable name.

Also, for the .upper(), the name you want to put before the . is also the variable name you have written.

Hope this helps!


#4

Add variable inside the len() not the String itself, and alse you have to use the print commad too.
So the code will be,

my_string="stanford"
print len(my_string)
print my_string.upper()


#5

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