Python_Chapter 3_Part One

Python_Chapter 3_Part One

University

18 Qs

quiz-placeholder

Similar activities

Python While Loops 2022

Python While Loops 2022

8th Grade - University

17 Qs

PowerPoint

PowerPoint

10th Grade - Professional Development

19 Qs

it10

it10

University

20 Qs

MAYA

MAYA

University

15 Qs

Chapter 5 - Part Two Class

Chapter 5 - Part Two Class

University

15 Qs

Test de evaluación para prácticas del Summer Camp

Test de evaluación para prácticas del Summer Camp

University

20 Qs

BSCS 3-5: PPL Final Quiz - 1-28-2025

BSCS 3-5: PPL Final Quiz - 1-28-2025

University

20 Qs

Quiz Repitition PL/SQL 31Mei2022

Quiz Repitition PL/SQL 31Mei2022

University

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