Python Syntax and Logic Quiz

Python Syntax and Logic Quiz

8th Grade

24 Qs

quiz-placeholder

Similar activities

Unit-8 (QB64) Year-6

Unit-8 (QB64) Year-6

6th Grade - University

22 Qs

Chapter 12 Exam Review

Chapter 12 Exam Review

8th Grade

20 Qs

HTML CSS JS

HTML CSS JS

6th - 8th Grade

20 Qs

List and Tuple Questions

List and Tuple Questions

8th Grade

20 Qs

(8) Himpunan Data Terstruktur

(8) Himpunan Data Terstruktur

8th Grade - University

20 Qs

петон

петон

8th Grade

21 Qs

Mock-Up Academy Programming Online Test

Mock-Up Academy Programming Online Test

6th Grade - University

20 Qs

Semester 1 games Review

Semester 1 games Review

8th Grade

25 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?