Python Programming Quiz

Python Programming Quiz

8th Grade

40 Qs

quiz-placeholder

Similar activities

Computer Quiz - Kelab Komputer / ICT

Computer Quiz - Kelab Komputer / ICT

3rd - 10th Grade

45 Qs

CFI- Final Assessment 2025

CFI- Final Assessment 2025

6th - 8th Grade

40 Qs

HTML Basics

HTML Basics

8th Grade

38 Qs

Python Quiz

Python Quiz

5th - 12th Grade

40 Qs

More About Python & AI

More About Python & AI

8th Grade

45 Qs

Computer Terms

Computer Terms

6th - 12th Grade

37 Qs

Python L3 Concepts

Python L3 Concepts

4th - 12th Grade

40 Qs

Coding Questions

Coding Questions

7th - 12th Grade

38 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Computers

8th Grade

Easy

Created by

HoangViet Phannguyen

Used 176+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if a while loop's condition is never false?

It stops after 10 iterations

It throws an error

It runs infinitely

It runs once

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does len(my_list) return for my_list = [1, 2, 3]?

2

3

1

4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the error in this code?

4 should be in brackets [4]

my_list[3] should be my_list(3)

Index 3 is out of range

4

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does range(1, 4) generate in a for loop?

4, 3, 2, 1

0, 1, 2, 3

1, 2, 3

1, 2, 3, 4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the code below in Python?

5.77

5.76543

5.76

5.765

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the code below in Python?

2

2.5

1

10

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is wrong with this code?

The second condition will never execute

elif should be else if

num is not defined

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?