1
2
3
4
5
6
7
8
9
10
11
12
To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to Trinket.
Post a review on Amazon for the paperback or the Kindle edition.
Email me to give me a compliment, complaint, or correction. I'll respond.
0,1,2,3,4,5,6,7,8,9,10,11
0
0
0
0
Complete this code to convert to lowercase: | small_letters = big_letters.lower_____ | () | ^ *\(\) *$ |
Complete this code to convert to lowercase: | small_letters = big_letters______________ | .lower() | ^ *\.lower\(\) *$ |
Convert the string stored in the variable names to lowercase and assign the converted string to the same variable, names. | names = names.lower() | names `= `names`.`lower`(`) | |
Convert the string stored in y to uppercase and assign the converted string to x. | x = y.upper() | x = y.upper() | |
Convert "abc" to "ABC" and store the converted string in a variable. Make up the variable name. | cap_letters = "abc".upper() | ^ *[a-zA-Z_][a-zA-Z0-9_]* = •abc•\.upper\(\) *$ | |
Convert "robin hood" to "Robin Hood" and store the converted string in a variable. Make up the variable name. | correct_capitalization = "robin hood".title() | ^ *[a-zA-Z_][a-zA-Z0-9_]* = •robin hood•\.title\(\) *$ | |
Convert the string stored in the variable to lowercase and assign the converted string to the same variable. | name = "aBRogasT" | name = name.lower() | ^ *name = name\.lower\(\) *$ |
Convert the string stored in the variable to uppercase and assign the converted string to a second variable. Make up the second variable's name. | name = "aBRogasT" | all_upper = name.upper() | ^ *[a-zA-Z_][a-zA-Z0-9_]* = name\.upper\(\) *$ |
Convert the string stored in a variable to uppercase. Then convert it to initial capital letters. Keep assigning the converted strings to that same variable. Make up the variable name. | x = x.upper() x = x.title() | ^ *([a-zA-Z_][a-zA-Z0-9_]*) = \1\.upper\(\)\n\1 = \1\.title\(\) *$ | |
Run a for loop to convert all the elements of a list to lowercase. Make up the list name and the variable name. | for city in cities: city = city.lower() | ^ *for ([a-zA-Z_][a-zA-Z0-9_]*) in [a-zA-Z_][a-zA-Z0-9_]*:\n \1 = \1\.lower\(\) *$ | |
| 9b4464e6a4 | ||
| f11749cda6 |