goofy mistakes Flashcards

1
Q

What will be printed:

for i in range(2):
print(‘*’, end=’’)
for j in range(3):
print(‘#’, end=’’)
print()

A

*###
*###

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Show what will be printed:

number = 5
while number < 10:
number += 2
print(‘number is’, number)
print(‘And that is all.’)

A

number is 7
number is 9
number is 11
And that is all.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what will this print:
print(“hello’)

A

syntax error (cannot mix quotations like that)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Show result:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly