Python Basics Quiz for Grade 8

Python Basics Quiz for Grade 8

8th Grade

10 Qs

quiz-placeholder

Similar activities

Express Course (v2024) Quiz 3

Express Course (v2024) Quiz 3

6th - 8th Grade

10 Qs

Robotik Kodlama-Temel Bilgisayar Bilgisi

Robotik Kodlama-Temel Bilgisayar Bilgisi

6th - 8th Grade

15 Qs

80th Independence Day of Indonesia, Quiz Game Pre

80th Independence Day of Indonesia, Quiz Game Pre

6th - 8th Grade

15 Qs

Quiz Assesmen Awal "Perangkat Keras"

Quiz Assesmen Awal "Perangkat Keras"

7th Grade - University

10 Qs

Quiz Google sheet inf 8 semester ganjil

Quiz Google sheet inf 8 semester ganjil

8th Grade

10 Qs

Class 8_2025_CLASS,INPUTOUTPUT

Class 8_2025_CLASS,INPUTOUTPUT

8th Grade

12 Qs

Happy Hour #1

Happy Hour #1

8th Grade

15 Qs

Questionário - Prog. I

Questionário - Prog. I

6th - 8th Grade

7 Qs

Python Basics Quiz for Grade 8

Python Basics Quiz for Grade 8

Assessment

Quiz

Information Technology (IT)

8th Grade

Hard

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

1st_variable

firstVariable

first-variable

first variable

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? ```python x = 10 if x > 5: print("Greater") else: print("Smaller") ```

Greater

Smaller

Error

None

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the error in the following code: ```python for i in range(5) print(i) ```

Missing colon (:) after range(5)

Indentation error

Syntax error in print statement

No error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? ```python x = 3 y = 5 if x < y and y > 2: print("True") else: print("False") ```

True

False

Error

None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a logical operator in Python?

and

or

not

then

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? ```python for i in range(3): print(i) ```

0 1 2

1 2 3

0 1 2 3

1 2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about indentation in Python is true?

Indentation is optional in Python.

Indentation is used to define blocks of code.

Indentation can be replaced with semicolons.

Indentation is only required in loops.

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?