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
Unit I: Engineering Introduction

Quiz
•
9th - 12th Grade
15 questions
Quiz on Control Structures

Quiz
•
12th Grade
20 questions
Asynchronous AR 2.0

Quiz
•
8th Grade - University
10 questions
C Programming Control Statements

Quiz
•
12th Grade
10 questions
4.1.1 - Open and Closed Loop Systems

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

Quiz
•
9th - 12th Grade
12 questions
Python 1

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

Quiz
•
12th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Engineering
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University