Logic operators, code identification and constants in Python

Logic operators, code identification and constants in Python

9th Grade

17 Qs

quiz-placeholder

Similar activities

Google

Google

7th - 12th Grade

12 Qs

Python Interaction

Python Interaction

9th Grade

20 Qs

Web Design Advanced HTML CSS

Web Design Advanced HTML CSS

9th - 12th Grade

18 Qs

Cell Phone Vocabulary

Cell Phone Vocabulary

9th - 12th Grade

12 Qs

MOS Word 2016 Learn by Doing Part 4 Working with Tables

MOS Word 2016 Learn by Doing Part 4 Working with Tables

8th - 12th Grade

12 Qs

Higher Business Management Marketing Revision

Higher Business Management Marketing Revision

KG - University

20 Qs

Parts of the Word Window 2021

Parts of the Word Window 2021

9th Grade

12 Qs

Bitcoin & Blockchain

Bitcoin & Blockchain

7th - 12th Grade

12 Qs

Logic operators, code identification and constants in Python

Logic operators, code identification and constants in Python

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Vernon Leigh

Used 7+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression `5 > 3 and 7 < 10`?

Both of the above

False

True

Neither of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax for the NOT operator in Python?

x not y

not x

y not x

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the expression `not (4 != 4)`?

None of the above

Both of the above

True

False

4.

LABELLING QUESTION

1 min • 1 pt

Drag the labels to the correct locations on the code.

c
d
a
b
e
f

An integer

An inbuilt string function

A constant

'is the same as'

Assignment

A floating point variable

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, what does the `or` operator do?

Returns true if at least one of the conditions is met

Returns true if only both of the conditions are met

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the expression `(True and False) or (False and True)` evaluate to?

True

False

Both of the above

Neither of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, what does the `and` operator do?

Returns true if both conditions are met

Returns false if both conditions are met

Returns true if at least one condition it met

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?