
Python Quiz - 25/09/2024

Quiz
•
Computers
•
University
•
Hard
Aayush Tiwari
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will the following code output?
B
A
C
no output
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following statements is TRUE about the elif keyword?
It is used to replace multiple if statements.
It must always be followed by an else statement.
It allows checking multiple conditions sequentially.
It terminates the program if the condition is true.
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code?
X is greater
Y is greater
No output
Syntax error
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code?
0 1 2
1 2 3
infinite loop
3 2 1
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which loop will execute at least once, regardless of the condition?
For loop
While loop
Do-while loop
Nested loop
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code?
0 1 2
0 1 2 3 4
1 2 3
No output
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following statements is TRUE about loops in Python?
The "break" statement skips to the next iteration of the loop.
The "continue" statement exits the loop completely
A "while" loop can be used without a condition
The "else" part of a loop is executed only when the loop terminates normally, without a "break".
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Exception handling -oracle plsql

Quiz
•
University
15 questions
Control Statements - Java

Quiz
•
University
10 questions
Java Control Flow statements

Quiz
•
University
10 questions
P1_APLab2Quiz_B3B4

Quiz
•
University
10 questions
Third Year Placement Training Revision Test

Quiz
•
University
20 questions
Code Junction 4

Quiz
•
University
10 questions
C Programming Quiz-5

Quiz
•
University
20 questions
PL SQL

Quiz
•
University - Professi...
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade