
Python Programming Quiz - Period 4

Quiz
•
Computers
•
10th Grade
•
Hard
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
Similar Resources on Wayground
25 questions
Senior - Python Assessment 1

Quiz
•
9th - 12th Grade
31 questions
Python Lists

Quiz
•
8th Grade - University
28 questions
Linux Review 3

Quiz
•
8th Grade - Professio...
28 questions
java conditionals, loops, and methods

Quiz
•
10th Grade
25 questions
Intro to CS Unit 3 Review

Quiz
•
9th - 12th Grade
24 questions
CS-10 Chapter-8 DBMS Part 1: Rabin Ghimire

Quiz
•
10th Grade
24 questions
Tin ck2

Quiz
•
10th Grade
26 questions
AP CSP Unit 7: Parameters, Returns, and Libraries

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade