Python Programming Quiz

Python Programming Quiz

7th Grade

15 Qs

quiz-placeholder

Similar activities

soal informatika bab 3 kelas 7

soal informatika bab 3 kelas 7

7th Grade - University

20 Qs

Ch3判斷式-綜合演練選擇題

Ch3判斷式-綜合演練選擇題

6th - 8th Grade

10 Qs

Python

Python

7th Grade

10 Qs

Excel 7-klass 01.02.2025

Excel 7-klass 01.02.2025

7th Grade

15 Qs

MENGENAL CANVA

MENGENAL CANVA

7th Grade

20 Qs

postes

postes

7th Grade

10 Qs

Thử thách 9 - đường đua lập trình - tin 7

Thử thách 9 - đường đua lập trình - tin 7

7th Grade

20 Qs

Negative Programming Concepts Challenge

Negative Programming Concepts Challenge

7th Grade

10 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Information Technology (IT)

7th Grade

Medium

Created by

Fadi Fadi

Used 2+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function generates a whole number between 5 and 15, inclusive?

random.random(5, 15)

random.randint(5, 15)

random.choice(5, 15)

random.number(5, 15)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will this code print? x = 9 if x = 15: print("A") elif x >= 10: print("B") else: print("C")

A

B

C

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does this code print? if 10 != 5: print("Different") else: print("Same")

Same

Error

10

Different

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of this code? num = 3 if num % 2 == 0: print("Even") else: print("Odd")

Even

Odd

3

Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these operators means “equal to”?

=

==

:=

equals

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword follows an if condition if the first condition is false and a second needs to be checked?

elif

else

check

elseif

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does this code output? age = 17 if age >= 18: print("Adult") else: print("Minor")

Adult

Error

Minor

17

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?