2025/2026 Graded A+
What does the following Python Program print out?
str1 = "Hello"
str2 = 'there'
bob = str1 + str2
print(bob) - Hellothere
What does the following Python program print out?
x = '40'
y = int(x) + 2
print(y) - 42
How would you use the index operator [ ] to print out the letter q from the following string?
x = 'From ' - print(x[8])
How would you use string slicing [:] to print out 'uct' from the following string?
x = 'From ' - print(x[14:17])
What is the iteration variable in the following Python code?
for letter in 'banana' :
print(letter) - letter
What does the following Python code print out?
print(len('banana')*7) - 42
How would you print out the following variable in all upper case in Python?
greet = 'Hello Bob' - print(greet.upper())