Which of the following is a correct variable declaration in Python?

Python Programming Quiz - 2

Quiz
•
Engineering
•
12th Grade
•
Hard
Krishnesh G P
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 5
var x = 5
x = 5
declare x = 5
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data type is returned by the expression 3 + 2.5 in Python?
Integer
Float
String
Boolean
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used for exponentiation in Python?
^
**
%
//
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a mutable data type in Python?
String
Tuple
List
Integer
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? python Copy code a = 10 b = 20 a, b = b, a print(a, b)
10 10
10 20
20 10
20 20
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to create a conditional statement in Python?
if
for
while
switch
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? python Copy code x = 5 if x > 2: print("A") elif x > 4: print("B") else: print("C")
A
B
C
No output
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Python Functions and File Handling Quiz

Quiz
•
12th Grade
10 questions
Exploring Python Data Types and Control

Quiz
•
12th Grade
12 questions
Python 1

Quiz
•
9th - 12th Grade
12 questions
Quiz on Variables and Arithmetic Operations

Quiz
•
12th Grade - University
15 questions
PIF-Quiz 4

Quiz
•
9th - 12th Grade
20 questions
Asynchronous AR 2.0

Quiz
•
8th Grade - University
16 questions
OZ_ELK3 Quiz

Quiz
•
12th Grade
20 questions
PIF Session 5B Assessment

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Engineering
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
65 questions
MegaQuiz v2 2025

Quiz
•
9th - 12th Grade
10 questions
GPA Lesson

Lesson
•
9th - 12th Grade
15 questions
SMART Goals

Quiz
•
8th - 12th Grade
45 questions
Week 3.5 Review: Set 1

Quiz
•
9th - 12th Grade