Search Header Logo

python 2

Authored by Basim Mb

Physics

12th Grade

Used 16+ times

python 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

We can iterate over string

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

We can insert the new item into tuple

True

False

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the output of the following code?

0,1,2,3,4,5,6,7,8,9,10
0,1,2,3,4,5,6,7,8,9
1,2,3,4,5,6,7,8,9,10
1,2,3,4,5,6,7,8,9

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which code will successfully print the value of exactly 5 times?

for x in range(0,4):
print(x)
for x in range(0,5):
print(x)
for x in range 5:
print(x)
for x in range[0,5]:
print(x)

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

How many times will this loop run?

10
9
4
5

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

How many times will 'hello' be printed using this code?

3
6
9
27

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

I want to print "Password matched" if the user enters the correct password, otherwise allow them to try again. What is wrong with the code above?

last line should be OUTSIDE the loop
wrong operator used
wrong password
for loop needed to be used

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?