PROGRAMMING IN PYTHON - UNIT II - TEST 1 MCQS

Quiz
•
Computers
•
University
•
Hard
MS.SHYAMALADEVI C
Used 8+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to perform decision-making in Python?
for
while
if
switch
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet?
x = 5
if x > 3:
print("Greater than 3")
else:
print("Less than or equal to 3")
Greater than 3
Less than or equal to 3
Invalid syntax
No output
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the "else" statement in an "if-else" block?
To execute a block of code if the condition is true
To execute a block of code if the condition is false
To repeat a block of code multiple times
To skip the current iteration of a loop
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to combine multiple conditions in a Python if statement?
&&
||
&
|
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which loop executes a block of code a fixed number of times?
for loop
while loop
do-while loop
switch loop
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet?
for i in range(3):
print(i)
0 1 2
1 2 3
3 2 1
2 1 0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you exit a loop prematurely in Python?
continue
break
return
pass
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
AI BootCamp: 2024 Edition- Session 1

Quiz
•
University
10 questions
Session 2 | U

Quiz
•
University
15 questions
Python and PseudoCode Quiz

Quiz
•
10th Grade - University
18 questions
CSE 102 Exam 3 Practice

Quiz
•
University
14 questions
python functions

Quiz
•
University
15 questions
Exam 1 Practice

Quiz
•
University
16 questions
Python Basics

Quiz
•
KG - University
20 questions
Python Prowess

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University