Basics/Conditionals
Loops
Strings
Functions
100

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?

100

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)

What are 0,1,2,3,4

5,6,7,8,9

5, 7, 9

100

True or false:

I can use a negative index with a string. It just starts at -1 on the end

True

100

What will print onto the screen when the following program runs?

Slide 12

10

200

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?

200

What will be printed when the following program runs?

Slide 4

50

51

52

200

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]

200

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.

300

What will be the output of the following program? Slide 1

What is 29?

300

What will be printed when the program is run?

Slide 5

1

2

6

7

11

12

300

What will be printed onto the screen when the following program runs?

Slide 9

3 (9 times)

300

What will print onto the screen when the program runs?

Slide 13

12.5

400

What would be printed when the following program runs?

Slide 2

What is -1?
400

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

400

What will print onto the screen when the following program runs?

slide 10

55

400

What will print onto the screen when the following program runs?

Slide 14

300

500

What will be the output of the following program?

Slide 3

20

15

10

7

7

7

500

What will print onto the screen when the following program runs?

Slide 7

19

500

On which line will the following program return an error?

Slide 11

Line 3

500

What will print onto the screen when the following program runs?

Slide 15

WHAT IF WE JUST WENT HOE FOR

M
e
n
u