Quiz4

Quiz4

University

15 Qs

quiz-placeholder

Similar activities

Python Lists Quiz

Python Lists Quiz

University

17 Qs

Operators in Python

Operators in Python

9th Grade - Professional Development

17 Qs

Python Collection Data Type

Python Collection Data Type

University

20 Qs

Python Basics

Python Basics

University

10 Qs

Python List

Python List

University

10 Qs

Python Programming Intermediate-1

Python Programming Intermediate-1

University

15 Qs

Python Round 3

Python Round 3

University

11 Qs

Functions and Modules

Functions and Modules

University

10 Qs

Quiz4

Quiz4

Assessment

Quiz

Computers

University

Hard

Created by

Mohand Mahmoud

Used 2+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Return the string without any whitespace at the beginning or the end.

txt = " Hello World "

x =

txt.strip()

txt.split()

txt.format()

txt.capitalize()

2.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

print(bool("abc"))

True

False

3.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

if 5 == 10 ........... 4 == 4:

print("At least one of the statements is true")

in

or

and

||

4.

FILL IN THE BLANK QUESTION

1 min • 4 pts

fruits = ["apple", "banana", "cherry"]

Use the method to add "orange" to the fruits list.

5.

FILL IN THE BLANK QUESTION

1 min • 4 pts

fruits = ["apple", "banana", "cherry"]

Use the method to add "lemon" as the second item in the fruits list.

6.

FILL IN THE BLANK QUESTION

1 min • 4 pts

fruits = ["apple", "banana", "cherry"]

Use indexing to print the last item in the list.

7.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

fruits = {"apple", "banana", "cherry"}

if "apple"........ fruits:

print("Yes, apple is a fruit!")

in

notin

&&

and

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?