Python Quiz

Python Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

Python Function Structure

Python Function Structure

8th - 12th Grade

19 Qs

Introduction to Python Programming Quiz 9E

Introduction to Python Programming Quiz 9E

10th Grade - University

13 Qs

Introductory Quiz

Introductory Quiz

9th - 12th Grade

10 Qs

Python Quiz For Starters

Python Quiz For Starters

3rd Grade - Professional Development

17 Qs

Intro to Python Programming Quiz 9B

Intro to Python Programming Quiz 9B

10th Grade - University

14 Qs

Intro to Python Programming Quiz 9C

Intro to Python Programming Quiz 9C

10th Grade - University

12 Qs

Revision

Revision

12th Grade

10 Qs

python quiz

python quiz

1st - 12th Grade

10 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Other

12th Grade

Hard

Created by

Jibin Saji

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements will correctly print "Hello Python!" to the console?
print("Hello Python!")
display("Hello Python!")
show("Hello Python!")
echo("Hello Python!")

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to store the number 10 in a variable named x?
x = 10
10 = x
variable x = 10
set x to 10

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

name = input("Enter your name: ")

print("Hello",name)

name"
Hello, John
Hello,
Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the if statement in Python?
To create a loop that repeats code.
To define a new function.
To execute a block of code only if a certain condition is true.
To display output on the screen.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times will the word "Python" be printed by the following code?

for i in range(3):

print("Python")

Zero
1.0
2.0
3.0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid Python variable name?
my_variable
_score
2nd_number
userAge

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 15 % 4 in Python?
3.0
2.0
1.0

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?