Search Header Logo

Python Test 1

Authored by Peter Parfenov

Computers

University

Used 5+ times

Python Test 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

27 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

fruits = ['apple', 'orange', 'cherry']

lst = ['apple' for x in fruits]

What will be the value of lst?

['apple', 'apple', 'apple']

['apple']

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

fruits = ['apple', 'banana', 'cherry']

What is a correct syntax for looping through the fruits?

print(x) for x in fruits

for x in fruits print(x)

[print(x) for x in fruits]

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

Insert the missing part (___) of the while loop below:

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What will be the result of the following syntax:

x = 8

x += 2

print(x)

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

The statement below would print a Boolean value, which one?

print(bool("letter"))

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

The statement below would print a Boolean value, which one?

print(10 == 9)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of the following syntax:

print(5 > 3)?

True

False

5 > 3

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?

Discover more resources for Computers