
Python Programming Quiz

Quiz
•
Information Technology (IT)
•
1st Grade
•
Easy
Fadi Fadi
Used 4+ times
FREE Resource
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code output? numbers = [1, 2, 3] for n in numbers: print(n * 2)
1 2 3
2 4 6
1 4 9
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to loop through a list?
loop
iterate
for
each
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed here? fruits = ["apple", "banana", "cherry"] print(fruits[1])
apple
banana
cherry
Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will this print "Hi"? for i in range(3): print("Hi")
1
2
3
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code? nums = [2, 4, 6] for n in nums: print(n + 1)
2 4 6
3 5 7
1 3 5
2 5 7
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this function return? def add(x, y): return x + y print(add(3, 4))
Error
7
34
"x + y"
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the final value of total? numbers = [1, 2, 3, 4] total = 0 for n in numbers: total += n
9
10
24
0
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Tugas Pembatik Level 2

Quiz
•
1st - 5th Grade
26 questions
Battle kelas 1

Quiz
•
1st Grade
20 questions
Belajar Microsoft Excel

Quiz
•
1st Grade
24 questions
SOAL Pra-Responsi - Praktikum Struktur Data

Quiz
•
1st Grade
25 questions
Software Testing in Java

Quiz
•
1st Grade - University
24 questions
1ºESO - TECNOLOGIA - REPASO TEMA 1

Quiz
•
1st Grade
22 questions
Tin5. Ôn thi cuối HK1 - PĐ1

Quiz
•
1st - 5th Grade
22 questions
Join

Quiz
•
1st Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade