These multiple choice quesitons are for Python Math/Types and Storing Multiple Values in Lists.
Python Math/Types
apples = 10 oranges = '12'
What is the correct way to add the number of apples to the number of oranges?
apples + oranges
apples.append(oranges)
apples + int(oranges)
str(apples) + oranges
Consider the following code:
fruits = ['apples', 'oranges', 'bananas']
tangerines = (2, 9)
fruits.append(tangerines)
What is the output of print(fruits)
?
['apples', 'oranges', 'bananas', (2, 9)]
['apples', 'oranges', 'bananas', 2, 9]
['apples', 'oranges', 'bananas', [2, 9]]
['apples', 'oranges', 'bananas'], (2, 9)
Explanation of distractors: