Quiz4

Quiz4

University

15 Qs

quiz-placeholder

Similar activities

Operators in Python

Operators in Python

9th Grade - Professional Development

17 Qs

Advance Module Python

Advance Module Python

University

15 Qs

computer

computer

University

20 Qs

KODEKIDDO HACK #MLH3

KODEKIDDO HACK #MLH3

4th Grade - University

10 Qs

PPS PYTHON QUIZ

PPS PYTHON QUIZ

University

20 Qs

Moringa JavaScript Arrays

Moringa JavaScript Arrays

5th Grade - Professional Development

10 Qs

Python quiz

Python quiz

10th Grade - Professional Development

10 Qs

list 6th

list 6th

7th Grade - University

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