What does this code print? x = 10 if x > 5: print("Big") else: print("Small")

Python Basics Quiz

Quiz
•
Information Technology (IT)
•
8th Grade
•
Hard
Fadi Fadi
Used 2+ times
FREE Resource
34 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Small
Big
Error
10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly uses elif?
if x 5: print("Greater than 5") elif x == 3: print("Exactly 3") else: print("Other")
Greater than 5
Exactly 3
Other
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword ends an if...elif... block?
switch
for
else
end
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code print? x = 10 if x > 5: print("Hi") print("Bye")
Hi
Hi Bye
Bye
Nothing
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if no if or elif condition is true and there is no else?
It crashes
It runs anyway
Nothing happens
It prints None
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is NOT a valid use of if?
if x:
if x == 10:
if x = 10:
if x != 5:
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Fill in the blank: if temperature > 30: print("Hot") _____ temperature = 8?
True
False
Error
None
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
PENILAIAN TENGAH SEMESTER

Quiz
•
7th Grade - University
35 questions
8кл-18

Quiz
•
8th Grade
39 questions
8-кл-19

Quiz
•
8th Grade - University
35 questions
ASTS TIK 5 GENAP

Quiz
•
5th Grade - University
37 questions
Sumatif Berpikir Komputasional

Quiz
•
8th Grade
35 questions
SOAL INFORMATIKA KELAS 8 GANJIL

Quiz
•
8th Grade
32 questions
Chapter 20 - Cash Flow Forecasting and Management Quiz

Quiz
•
6th Grade - University
35 questions
5) Ohm’s Law (p. 14) & Series and parallel circuits (p.15)

Quiz
•
8th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade