Python Syntax and Logic Quiz

Python Syntax and Logic Quiz

8th Grade

24 Qs

quiz-placeholder

Similar activities

PYTHON 1

PYTHON 1

6th - 8th Grade

21 Qs

🔥 LA1.C1.9CT: Computational Thinking (Stage 9)

🔥 LA1.C1.9CT: Computational Thinking (Stage 9)

8th Grade

26 Qs

Remedial INFORMATIKA KLS 8 SEMESTER 1 TAHUN 2024-2025

Remedial INFORMATIKA KLS 8 SEMESTER 1 TAHUN 2024-2025

8th Grade

25 Qs

Quiz sobre Lenguajes de Marcas

Quiz sobre Lenguajes de Marcas

4th Grade - University

29 Qs

PYTHON

PYTHON

8th Grade

19 Qs

Statements in Python

Statements in Python

8th Grade

20 Qs

Ch. 5 Exam Review

Ch. 5 Exam Review

8th Grade

20 Qs

Soal Latihan Blockly kelas 8

Soal Latihan Blockly kelas 8

8th Grade - University

23 Qs

Python Syntax and Logic Quiz

Python Syntax and Logic Quiz

Assessment

Quiz

Information Technology (IT)

8th Grade

Easy

Created by

Fadi Fadi

Used 3+ times

FREE Resource

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for an if statement in Python?

if x == 10:

if x => 10:

if (x == 10)

if x = 10

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does elif stand for?

Else-if

Else and If

Else Loop

If Loop

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What operator is used for multiple conditions that must be true?

and

==

not

or

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is a valid use of or?

if x == 5 or y == 5:

if x == 5 or:

if x == 5 or y:

if or x == 5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If x = 3, what will this print? if x == 3 or x == 4: print("Yes")

Yes

No

Error

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbol means “not equal”?

!=

<>

~=

==!

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will random.randint(1, 1) return?

Always 1

Error

A random number

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?