Python - MP2 Test

Python - MP2 Test

10th Grade

14 Qs

quiz-placeholder

Similar activities

Python Basics Review

Python Basics Review

10th Grade

18 Qs

Computational Thinking

Computational Thinking

9th - 11th Grade

12 Qs

year 8 lesson 2 quiz - python

year 8 lesson 2 quiz - python

8th - 10th Grade

14 Qs

Foundations of Programming

Foundations of Programming

9th - 10th Grade

18 Qs

Python - Quiz

Python - Quiz

9th - 11th Grade

17 Qs

Python Basics

Python Basics

KG - University

15 Qs

Python programming

Python programming

6th - 12th Grade

16 Qs

Python (Selection)

Python (Selection)

8th - 10th Grade

13 Qs

Python - MP2 Test

Python - MP2 Test

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Allyson Smith

Used 4+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to take user input in Python and store it in a variable named `name`?

`name = input("Enter your name: ")`

`input("Enter your name: ") = name`

`name = input()`

`input() = name`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid conditional statement in Python?

if x = 5:

if x == 5:

if (x == 5)

if x := 5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

`Smaller`

`Greater`

`Error`

`None`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many times will the following loop execute?

1

2

3

4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

1 2 3 4

0 1 2 3 4

1 2 3 4 5

0 1 2 3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

15

5

Error

None

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of an extended for loop in Python?

`for i in range(10):`

`for i in range(0, 10, 2):`

`for i in [1, 2, 3]:`

`for i in "hello":`

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?