Python Quiz

Python Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

Lý thuyết về Python

Lý thuyết về Python

3rd Grade - University

10 Qs

PYTHON

PYTHON

12th Grade

12 Qs

python

python

12th Grade

13 Qs

Повторение  мод2

Повторение мод2

9th - 12th Grade

17 Qs

Coding Flight Basics in PyCharm

Coding Flight Basics in PyCharm

9th - 12th Grade

18 Qs

Season 1 #Spaic Python Weekly Quiz

Season 1 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

Python - Selection (IF statements)

Python - Selection (IF statements)

9th - 12th Grade

17 Qs

Python Programming

Python Programming

3rd Grade - University

17 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Other

12th Grade

Hard

Created by

Jibin Saji

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?