Python_Chapter 3_Part One

Python_Chapter 3_Part One

University

18 Qs

quiz-placeholder

Similar activities

VR, AR, AI, Metaverse...

VR, AR, AI, Metaverse...

University

18 Qs

Introduction to ICT

Introduction to ICT

11th Grade - University

15 Qs

it10

it10

University

20 Qs

Week 6 - Conditional Statements in Python

Week 6 - Conditional Statements in Python

University

15 Qs

Principles of Design

Principles of Design

6th Grade - University

20 Qs

R093 Revision 1

R093 Revision 1

10th Grade - University

15 Qs

planning and supervision plumbing L3

planning and supervision plumbing L3

University

15 Qs

G0102 imi paper 2

G0102 imi paper 2

University

15 Qs

Python_Chapter 3_Part One

Python_Chapter 3_Part One

Assessment

Quiz

Instructional Technology

University

Hard

Created by

Kevin Tinsley

Used 4+ times

FREE Resource

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of expression has a value of either true or false?

relational

binary

Boolean

if-else

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following creates a Boolean variable?

flag = True or False

flag = True

if flag == True:

flag == "False"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The and operator has

higher precedence than the or operator, but lower precedence than the not operator

higher precedence than the or and not operators

lower precedence than the or operator, but higher precedence than the not operator

lower precedence than the or and not operators

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following in this expression is evaluated first?

age >= 65

age <= 18

status == "retired"

age >= 65 or age <= 18

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following in this expression is evaluated first?

age >= 65

status == "retired"

age < 18

status == "retired" or age < 18

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When two strings are compared, they are evaluated based on the _________________ of the characters in the string.

uppercase/lowercase sequence

alphabetical order

sort sequence

string method

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To compare two strings with mixed uppercase and lowercase letters, a programmer can first use the

upper() method to convert the first character in each string to uppercase.

lower() method to convert all characters in each string to lowercase.

lower() method to convert all characters after the first character in each string to lowercase.

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?