What is wrong here?


#1



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


File "python", line 5
print .upper()my_string
^
Codeacademy also says "it looks like nothing was printed to your console!"
SyntaxError: invalid syntax

I expected the code to print my_string "news" in capital letters and tell me the length of it.

Replace this line with your code. 
my_string = "news"
len(NEWS)
print .upper()my_string


#2

Your format should be:

print your_string.upper()

You have the order reversed


#3

I'm still having trouble. I changed the code to this:

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

I'm still told it is wrong.


#4

Wait nope! I got it, thanks for your help!


#5

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