Python Programming Quiz - Period 4

Python Programming Quiz - Period 4

10th Grade

29 Qs

quiz-placeholder

Similar activities

Python GCSE

Python GCSE

10th Grade

27 Qs

Code.org AP Computer Science Principles Unit 6

Code.org AP Computer Science Principles Unit 6

9th - 12th Grade

24 Qs

CPM2 Quiz Review

CPM2 Quiz Review

10th - 12th Grade

25 Qs

Python for Absolute Beginners

Python for Absolute Beginners

8th - 12th Grade

25 Qs

Python Basics-01

Python Basics-01

9th - 12th Grade

32 Qs

Python Coding Specialist Exam

Python Coding Specialist Exam

9th Grade - Professional Development

31 Qs

8th Grade (Programming B)

8th Grade (Programming B)

8th - 12th Grade

25 Qs

python functions

python functions

10th - 11th Grade

25 Qs

Python Programming Quiz - Period 4

Python Programming Quiz - Period 4

Assessment

Quiz

Computers

10th Grade

Hard

Created by

James Dillon

Used 1+ times

FREE Resource

29 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method from the Python os module is used to remove a file?

delete_file()

remove()

unlink()

erase()

delete()

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What is the output of the following code snippet? If 5 > 3 and 10 > 9 print("True")

True

False

Syntax Error

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given: fruits: ['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry', 'Fig'] Which answer choice would remove the item 'Fig' from the list?

pop.fruits(5)

fruits.pop(6)

fruits.remove(5)

fruits.remove(6)

fruits.pop()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

colors = ['red', 'green', 'blue'] colors[0:2] = ["yellow", "purple"] print(colors)

['yellow', 'purple', 'blue']

['red', 'yellow', 'purple', 'blue']

['yellow', 'purple', 'green', 'blue']

['red', 'green', 'blue']

['yellow', 'red', 'purple', 'green', 'blue']

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following data types is used to represent a sequence of characters?

Integer

String

Boolean

List

Dictionary

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the function isEven, select the answer that returns 'True' for the input 4.

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given a string, return True if the string "abc" appears in the string but not directly followed by "d".

It should be if 'abc' in text and not 'abcd' in text:

It should check for 'abc' not followed by 'd' with regex:

Only check if 'abc' is in the text, ignore 'd':

Use text.find('abc') and ensure 'd' does not follow:

Check every occurrence of 'abc' to ensure it's not followed by 'd':

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?