Quiz4

Quiz4

University

15 Qs

quiz-placeholder

Similar activities

loops and iterables in python

loops and iterables in python

University

20 Qs

PPS PYTHON QUIZ

PPS PYTHON QUIZ

University

20 Qs

Moringa JavaScript Arrays

Moringa JavaScript Arrays

5th Grade - Professional Development

10 Qs

Advance Module Python

Advance Module Python

University

15 Qs

computer

computer

University

20 Qs

ITIPT01 Quiz No 1

ITIPT01 Quiz No 1

University

20 Qs

Intermediate Python

Intermediate Python

University

15 Qs

Python Quiz Ver- 1.3

Python Quiz Ver- 1.3

University

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