Python Programming Quiz

Python Programming Quiz

1st Grade

22 Qs

quiz-placeholder

Similar activities

Pengenalan HAKI dan Undang-Undang ITE

Pengenalan HAKI dan Undang-Undang ITE

1st Grade

21 Qs

Quis DPK Pra Sumatif Akhir Semester

Quis DPK Pra Sumatif Akhir Semester

1st Grade

20 Qs

Struktur Data - 2

Struktur Data - 2

1st Grade

17 Qs

Python Algortima Rekrusif Pert-10

Python Algortima Rekrusif Pert-10

1st Grade

20 Qs

BSK-5-PB

BSK-5-PB

1st Grade

20 Qs

Quiz de Combinaciones de Teclas

Quiz de Combinaciones de Teclas

1st Grade

18 Qs

Repaso Tema 1

Repaso Tema 1

1st Grade - University

21 Qs

bài 10 (ux)

bài 10 (ux)

1st Grade

17 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Information Technology (IT)

1st Grade

Easy

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?