what will be the output?
a,b=3,4
if a>b:
print("a")
if b>a:
print("b")
else:
print("else")
python conditional statements intermediate level
Quiz
•
Information Technology (IT)
•
9th - 12th Grade
•
Hard
Krishna Kala
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what will be the output?
a,b=3,4
if a>b:
print("a")
if b>a:
print("b")
else:
print("else")
b
error
else
b
else
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what will be the output of the following code?
a,b=3,4
if a>b:
print("a")
if b>a:
print("b")
if a==b:
print("a=b")
else:
print("else")
b
error
else
b
else
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what will be the output of the following code?
x = 6
y = 9
z = 12
if x < y and y > z:
print("Condition 1")
elif x z > y and y + z < x 3:
print("Condition 2")
elif z // x == 2 or x + y == z:
print("Condition 3")
else:
print("Condition 4")
Condition 1
Condition 2
Condition 3
Condition 4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code.?
p = 8
q = 3
r = 10
if p + q < r:
if q r > p p:
print("Outcome A")
elif r % q == 1:
print("Outcome B")
else:
print("Outcome C")
elif p % q == 2 and r - p > q:
print("Outcome D")
else:
print("Outcome E")
Outcome D
Outcome E
Outcome B
Outcome C
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what will be the output.?
X is greater
Y is greater
Syntax error
Indentation error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
a = 7
b = 9
if a < b
print("A is less than B")
else:
print("A is greater or equal to B")
A is less than B
A is greater or equal to B
Syntax error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
x = 10
y = "5"
if x > y:
print("X is greater than Y")
else:
print("Y is greater than or equal to X")
X is greater than Y
Y is greater than or equal to X
error
10 questions
Logika Pemrograman pt 2
Quiz
•
11th Grade
10 questions
Logika Pemrograman
Quiz
•
11th Grade
15 questions
Selection Programming_If condition
Quiz
•
8th Grade - University
14 questions
Kuis XI
Quiz
•
11th Grade
10 questions
Struktur Pemrograman Arduino
Quiz
•
11th Grade
7 questions
операторы Python
Quiz
•
9th Grade
10 questions
SAP Lintas Bidang (Problem pada Segitiga)
Quiz
•
11th Grade
7 questions
Lekcja 2.3
Quiz
•
5th Grade - University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University