
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
Which of the following is a correct variable declaration in Python?
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 Wayground
10 questions
Mastering Python Basics

Quiz
•
12th Grade
10 questions
Intro to Coding

Quiz
•
12th Grade - University
20 questions
Quiz Pemrograman Arduino

Quiz
•
11th Grade - University
20 questions
PRACTICE TEST ARDUINO

Quiz
•
11th Grade - University
15 questions
Diagnostics for IoT302

Quiz
•
12th Grade
20 questions
C Programming Pointers Quiz

Quiz
•
12th Grade
10 questions
p2rt

Quiz
•
7th Grade - University
14 questions
Python for Data Sciences Quiz

Quiz
•
12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade