Strings & Console Output 16/16



Let's wrap it all up!

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

I don't know what to do. has anyone got any ideas

iv wrote but it says its wrong

Write your code below, starting on line 3!

my_string print "Foxtrot"
print my_string
print .upper() my_string


Hey Callumhatch,

You're pretty close! Line one shouldn't be printing anything though, and you set a variable using variable = value. So it should look like

my_string = "Foxtrot"

Then, the print() is a function which takes the string to print as a parameter, so line two is close but should look like this instead:


And on line three, you've got the idea again, but it's not quite correct. It should look like this:


I hope this helps, let me know if you've got any more questions!


He needs to create a variable, than print the length of the variable, than print the variable in caps

so the first this is right but for the print function it should be

print len(my_string)

also print functions dont need parenthesis but it doesnt change anything other than organization


This topic is solved.