Python Syntax and Logic Quiz

Python Syntax and Logic Quiz

8th Grade

24 Qs

quiz-placeholder

Similar activities

Quiz on Error Types in Programming

Quiz on Error Types in Programming

8th Grade

20 Qs

Ch. 5 Exam Review

Ch. 5 Exam Review

8th Grade

20 Qs

CAT 1 BASIC 8 COMPUTING

CAT 1 BASIC 8 COMPUTING

8th Grade

20 Qs

Chapter 4 Exam Review

Chapter 4 Exam Review

8th Grade

20 Qs

[PTB] Lesson 3 + 4

[PTB] Lesson 3 + 4

6th - 8th Grade

20 Qs

Quiz sobre Programación en Python

Quiz sobre Programación en Python

8th Grade

26 Qs

Quiz sobre Lenguajes de Marcas

Quiz sobre Lenguajes de Marcas

4th Grade - University

29 Qs

Statements in Python

Statements in Python

8th Grade

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