
control statments quiz
Authored by jaya mulimani
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the below code snippet?
num1=100
num2=200
num3=6
if(5>=num3):
if(num1>100 or num2>150):
print("1")
elif(num1>=100 and num2>150):
print("2")
else:
print("3")
1
2
3
None of the above
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What should be the value of num1 and num2 to get the output as "1"?
if((num1/num2==5) and (num1+num2)>5):
print("1")
elif((num1-num2)<=1 or (num1%num2)==0):
print("2")
else:
print("3")
num1=11, num2=2
num1=0, num2=5
num1=5, num2=1
num1=-10,num2=2
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the code given below?
a = -10
b = -200
c = 2000
d = 4000
if( a*b >=d):
if(d>c):
if(d%c!=0):
print(11)
else:
print(22)
else:
if(b/a >0):
if(a<b or d%c!=0):
print(33)
else:
print(44)
11
22
44
33
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How many times "executed" will be printed in the output?
for variable_1 in range(1,5,-1):
print("executed")
0
5
1
4
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Predict the output of the following code snippet.
number=28
for num in range(25,30):
if(number>num):
print(num)
else:
print(num)
break
a. 28
b. 25 26 27 28
c. 25 26 27
d. 25 26 27 28 29
a
b
c
d
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Predict the output of the following code snippet.
for num in 23, 45, 50, 65, 76, 90:
if(num%5!=0):
continue
if(num%10==0):
print(num, end=" ")
continue
if(num%3==0):
print(num, end=" ")
45 50 90
45 50 65 90
45 90
23 76
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Predict the output of the following code snippet.
for number in 10,15:
for counter in range(1,3):
print(number*counter, end=" ")
10 20 15 30
10 20 30 15 30 45
10 15 20 30 30 45
10 15 20 30
Access all questions and much more by creating a free account
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
10 questions
Quiz CodeIgniter 4
Quiz
•
University
10 questions
Lenguaje Perl
Quiz
•
University
10 questions
R Quiz
Quiz
•
University
10 questions
Kiến thức về xâu kí tự trong Python
Quiz
•
10th Grade - University
10 questions
TIU Quiz-9
Quiz
•
University
10 questions
Python Yazılım Dilleri Soruları
Quiz
•
University
10 questions
Chapter 5 Test Management Part 1
Quiz
•
University
10 questions
GODOT ENGINE
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University