Python Quiz #1

Python Quiz #1

8th Grade

22 Qs

quiz-placeholder

Similar activities

Ancient Greece - Vocabulary

Ancient Greece - Vocabulary

6th - 8th Grade

18 Qs

Season 5 #Spaic Python Weekly Quiz

Season 5 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

POP Review Lesson

POP Review Lesson

7th - 8th Grade

20 Qs

G4 Quiz

G4 Quiz

2nd - 8th Grade

20 Qs

Découverte de Garry's Mod

Découverte de Garry's Mod

6th Grade - University

20 Qs

Cornell Notes

Cornell Notes

6th - 8th Grade

20 Qs

Review for Final Exam in App Creators L. 1&2

Review for Final Exam in App Creators L. 1&2

7th - 8th Grade

19 Qs

PBIS-REMS

PBIS-REMS

6th - 8th Grade

20 Qs

Python Quiz #1

Python Quiz #1

Assessment

Quiz

Other

8th Grade

Hard

Created by

Julio Hernandez Saca

Used 5+ times

FREE Resource

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Question : What is the result of the following Python expression?

A) 11

B) 16

C) 10

D) 26

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question : Which of the following data types is used to store whole numbers in Python?

A) Float

B) String

C) Integer

D) Boolean

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question : Which loop is typically used when you know in advance how many times you want to repeat a piece of code?

A) For loop

B) While loop

C) Do-While loop

D) Repeat-Until loop

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Question : What will the following code print?

A) 0 1 2 3 4

B) 1 2 3 4 5

C) 0 1 2 3

D) 1 2 3 4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question : In Python, what keyword is used to start an if-else statement?

A) elif

B) else

C) then

D) case

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question : Which of the following is not a valid variable name in Python?


A) my_variable

B) 123variable

C) _underscore

D) myVariable

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the random.randint(1, 10) function do in Python?

A) Generates a random float between 1 and 10

B) Generates a random integer between 1 and 9

C) Generates a random integer between 1 and 10

D) Generates a random integer between 2 and 10

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?