Computer Science
Predict the output of the following code fragments:
x = "apple, pear, peach"
y = x.split(", ")
for z in y :
print(z)
Related Questions
Predict the output of the following code fragments:
for x in 'lamp': print(str.upper(x))
Predict the output of the following code fragments:
x = 'one' y = 'two' counter = 0 while counter < len(x): print(x[counter], y[counter]) counter += 1
Predict the output of the following code fragments:
x ='apple, pear, peach, grapefruit' y = x.split(', ') for z in y: if z < 'm': print(str.lower(z)) else: print(str.upper(z))
Which of the following is the correct output for the execution of the following Python statement ?
print(5 + 3 ** 2 / 2)
- 32
- 8.0
- 9.5
- 32.0