On which line will this program call an error in the console?
total = int(input('Enter a number: '))
quartered = total / 4
print('One quarter of ' + total)
print('is equal to ' + str(quartered))
What is the third line?
What will be the values of i in these loops?
for i in range(5)
for i in range(5, 10)
for i in range(5, 10, 2)
5,6,7,8,9
5, 7, 9
True or false:
I can use a negative index with a string. It just starts at -1 on the end
True
What will print onto the screen when the following program runs?
Slide 12
10
What will calculate be set to when the following program is run?
calculate = (12 / 2 * 8 % 5 + 20 - 4 * 3) // 2
What is 5.0?
What will be printed when the following program runs?
Slide 4
51
52
In order to print the word gains, what should I write for line 2
slide 8
fresh = fresh[0:2] + fresh [4] + fresh [2:4]
What is wrong with this code?
def cube(length, width = 7, height):
return 2 * (length + width * height + height)
Can't declare a parameter like that. Must be the last one or all afterwards.
What will be the output of the following program? Slide 1
What is 29?
What will be printed when the program is run?
Slide 5
1
2
6
7
11
12
What will be printed onto the screen when the following program runs?
Slide 9
3 (9 times)
What will print onto the screen when the program runs?
Slide 13
12.5
What would be printed when the following program runs?
Slide 2
The following program will take in the name of a snack and a letter. What will print if the user enters empanadas for the snack and the letter d for the letter?
slide 6
found the letter d
What will print onto the screen when the following program runs?
slide 10
55
What will print onto the screen when the following program runs?
Slide 14
300
What will be the output of the following program?
Slide 3
20
15
10
7
7
7
What will print onto the screen when the following program runs?
Slide 7
19
On which line will the following program return an error?
Slide 11
Line 3
What will print onto the screen when the following program runs?
Slide 15
WHAT IF WE JUST WENT HOE FOR