Search Header Logo

Python VLQG 3

Authored by Quốc Thư

Computers

9th - 12th Grade

Used 8+ times

Python VLQG 3
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output?

x = 5

print(x > 3 and x < 10)

True

False

None

Error

5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A list is defined as:

a = [2, 4, 6, 8, 10]

print(a[1:4])

[2, 4, 6, 8]

[4, 6, 8]

[4, 6, 8, 10]

[6, 8]

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output? nums = [1, 2, 3] print(nums * 2)

[2, 4, 6]

[1, 2, 3, 1, 2, 3]

[1, 2, 3, 2, 3]

Error

None

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You want to generate numbers 0 → 4. Which is correct?

range(5)

range(0,5)

Both a and b

range(1,5)

None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output?

for i in range(2,10,3):

.........print(i, end=" ")

2 3 4 5 6 7 8 9

2 5 8

2 6 9

3 6 9

None

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output?

x = "Python"

print(x[::-1])

nohtyP

Python

error

Pyth

nothpy

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is not a valid Python boolean operator?

and

or

not

xor

All are valid

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?