16. and now for something completely familiar


#1



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


I am having trouble closing out the exercise. The print statements are giving me a real head ache.

my_string = 'alpha ' + ' bravo ' + 'charlie'
print.len(my_string)
print.upper(my_string)


I am getting a syntax error. Anyone know how to fix it.


Replace this line with your code.


#2

i would take a look at the string methods:

len("Charlie")
"Delta".upper()
"Echo".lower()

len() never uses a full stop, and .upper() is a method so it should be after the string (or variable containing a string)


#3

I finally got it. Thank you.

my_string = 'This is my string'
print len(my_string)
print my_string.upper()


#4

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