Python Syntax and Logic Quiz

Python Syntax and Logic Quiz

8th Grade

24 Qs

quiz-placeholder

Similar activities

Microsoft Excel

Microsoft Excel

8th Grade

20 Qs

Quiz aplikasi perkantoran

Quiz aplikasi perkantoran

8th Grade

20 Qs

List | Set | String - Nâng cao (1)

List | Set | String - Nâng cao (1)

6th - 8th Grade

23 Qs

QUIZ IT PRIMARY-SECONDARY

QUIZ IT PRIMARY-SECONDARY

6th - 8th Grade

25 Qs

Understanding Iteration and Selection

Understanding Iteration and Selection

8th Grade

19 Qs

Quiz Aplikasi Perkantoran

Quiz Aplikasi Perkantoran

8th Grade

25 Qs

ÔN TẬP CRV1

ÔN TẬP CRV1

6th Grade - University

22 Qs

mid exam 2017

mid exam 2017

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?