
Python Programming Quiz - Period 4
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Hard
James Dillon
Used 1+ times
FREE Resource
Enhance your content in a minute
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':
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
Modern Technologies
Quiz
•
10th - 11th Grade
25 questions
InDesign q1
Quiz
•
9th - 12th Grade
25 questions
Lesson 4_Advanced Motion Tweening
Quiz
•
9th - 12th Grade
24 questions
ICT Unit 3: Data, Information & Knowledge
Quiz
•
6th - 10th Grade
24 questions
minecraft
Quiz
•
KG - Professional Dev...
26 questions
AP CSP Cybersecurity and Global Impacts
Quiz
•
9th - 12th Grade
25 questions
Operating Systems
Quiz
•
9th - 12th Grade
25 questions
Electronic Components
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
