Search Header Logo

Python revision

Authored by Sherihan Awni

Computers

10th Grade

Used 3+ times

Python revision
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

45 sec • 1 pt

Media Image

What is the output of this code?

1

2

"a"

Error

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following creates a dictionary?

{"apple", 1}

["apple": 1]

{"apple": 1}

(apple:1)

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

How do you add a new key-value pair to a dictionary?

my_dict.add("color", "blue")

my_dict["color"] = "blue"

my_dict("color") = "blue"

my_dict += {"color": "blue"}

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will this code print?

1

2

10

20

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the result of this code?

5

7

3

2

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Which line causes an error?

{"a": 1, "b": 2}

d={"a": 1, "b": 2}

print(d["c"])

None

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What does this function return?

None

Hi!

greet

Error

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?