Can someone help me with 5/16?


On line 1, create a variable named parrot and set it to the string "Norwegian Blue". On line 2, type len(parrot) after the word print, like so: print len(parrot). The output will be the number of letters in "Norwegian Blue"!

var = "parrot" = str("Norwegian Blue")
print len(parrot)
What did I do wrong?


In Python we create variables using this syntax:

name_of_variable = value

We don't use any special keywords like var. And the name of the variable cannot be enclosed in quote marks.

Furthermore, this expression:

str("Norwegian Blue")

is redundant. "Norwegian Blue" is already a string (you can tell this by looking at quote marks) so you don't have to cast it into the string type.

parrot = "Norwegian Blue"


Thank you :grinning:


You're very welcome :panda_face:


eat some hot dogs hjgfhfdhfgfdhfshbfhbnfnbfhngfnfgnfgnbhotdogsfhrjhfgghrjy


thank you :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning:grinning: :grinning: :grinning: :grinning


That is very helpful factoradic.I was stuck on this code for a long time. Then I read this reply.



I am really glad you found it helpful :smile: Good luck with next exercises!


I had a similar problem and in mine the error message reads:
Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 2)
When i consistently type in:
1)parrot = "Norwegian Blue"
2) print len(parrot)= 13