script.py
1
parrot = "Norwegian Blue"
2
3
print "Norwegian Blue".lower()
parrot = "norwegian blue"
print  "norwegian blue".upper()
the_machine_goes on
line 5,
Learn
STRINGS & CONSOLE OUTPUT
lower()
Well done!
You can use the 
lower() method to get rid of all the capitalization in your strings. You call lower() like so:
"Ryan".lower()
which will return 
"ryan".
Instructions
1.
Call 
lower() on parrot (after print) 
script.py
1
parrot = "norwegian blue"
2
3
print  "norwegian blue".upper()
Run
Learn
STRINGS & CONSOLE OUTPUT
upper()
Now your string is 100% lower case! A similar method exists to make a string completely upper case.
Instructions
1.
Call upper() on parrot (after print on line 3) in order to capitalize all the characters in the string!
No comments:
Post a Comment