Search Header Logo

Python loops_21May20_2

Authored by Shalaka Ekbote

Computers

5th - 9th Grade

Used 10+ times

Python loops_21May20_2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would amount equal in this piece of code:

amount = 2 + 5 * 2

12
9
14
5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would be the value of ‘marks’ after running this code:
 
marks = 20
total = 5 
newmarks = marks * 3

60
45
100
75

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is printed when this program is run:
days = 5 
if days > 6:  
   print(“Month”)

else:  
   print(“Week”)

Month
Week
Day
4

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What letter will be printed on the screen after running this code:

team = “Manchester United”
letter = name[5]
print(letter)

M
d
e
Nothing prints

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be printed after running this FOR loop:

for number in range(6):
 
    print(number)

The number 6 
The numbers 0 - 5
The number 5
The numbers 1 - 6

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How many times does the following program print the word ‘computer’:

word= "computer"  
for num in range(1,6):
 
    print(word)

5
6
1
0

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Look at the code below and identify which of the statements below are true:

for loopCounter in range(10,101,10):
               
     print(loopCounter)

Starts at 10, goes up to 100, increases by 10
Starts at 10, goes upto 101, increases by 10
Starts at 1, goes upto 100, increases by 1
Starts at 10, goes upto 10, increases by 10

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?