Control Structures - Selection in Python
Quiz
•
Computers
•
8th Grade
•
Practice Problem
•
Hard
Meenal Tripathi
Used 12+ times
FREE Resource
Enhance your content in a minute
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In this python code, what message is displayed if the student scores 34?
You passed. Well done!
You failed. Try again!
Invalid score.
Syntax error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the attached python code, what is the purpose of converting num1 and num2 to integers?
To perform string operations
To compare them as numbers
To display them as text
To store them in a list
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be printed if num1 is 10 and num2 is 20 in the attached code?
First number is greater than the second
Second number is greater than the first
Numbers are equal
Invalid input
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In this example, which part of the if-statement will be executed if the input speed is below 40 mph?
if speed >= 70:
elif speed >=40:
else:
input("Enter driver's speed")
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of control structure is used in selection?
for loop
while loop
if-else statement
switch-case statement
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In this example, what will be the output if num1 is 25 and num2 is 25?
1st bigger than 2nd
2nd bigger than 1st
Numbers are equal
No output
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the elif statement in an if-elif-else statement?
To handle multiple conditions
To repeat a block of code
To define a function
To initialize variables
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Kuis 2.4 Informatika (Teknologi Informatika ubah Kehidupan)
Quiz
•
8th Grade
13 questions
Nhập môn HTML
Quiz
•
6th - 9th Grade
16 questions
Algo Quiz
Quiz
•
University
15 questions
[RB3-Ch9] Application of Computers
Quiz
•
8th Grade
15 questions
11° Evaluación bimestral de informática
Quiz
•
11th Grade
10 questions
Server Administration- Quiz 1
Quiz
•
12th Grade - University
11 questions
Computer Science (1-9) - Identifying & Preventing Threats
Quiz
•
University
15 questions
Начала программирования на языке Паскаль
Quiz
•
8th - 11th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
