Python Basics
Quiz
•
Computers
•
Professional Development
•
Medium
Urvashi Thapar
Used 6+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following code snippets is the correct one for opening the hello.txt file for writing?
output_file = open("hello.txt", "r")
output_file = openFile("hello.txt", "w")
output_file = open("hello.txt", "w")
output_file = File("hello.txt", "w")
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
which mode is used to open a file for exclusive creation?
r
w
x
a
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When you open a file using a with statement, Python will ________ the file automatically after you access it.
close
reset
delete
archive
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator can be used on a pathlib.Path object to extend the path it represents with subdirectories or filenames?
\
/
|
*
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does strip() do?
removes the content of the file
add in meta data
splits the file
Removes extra data at the beginning / end of the string
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var = = {"apple", "banana", "cherry"}, represents:
sets
dictionary
tuple
list
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
df.shape is used to index, Datatype and Memory information
True
False
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
JS
Quiz
•
Professional Development
10 questions
pemrograman dasar
Quiz
•
Professional Development
10 questions
List
Quiz
•
Professional Development
10 questions
การใช้งานคอมพิวเตอร์ เทคโนโลยีดิจิทัล และอินเทอร์เน็ต
Quiz
•
Professional Development
11 questions
Email of request
Quiz
•
12th Grade - Professi...
10 questions
Sistema Operativo Ubuntu
Quiz
•
University - Professi...
10 questions
Android Application
Quiz
•
Professional Development
10 questions
Apache Spark
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween
Quiz
•
Professional Development
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
50 questions
ASL Colors and Clothes
Quiz
•
KG - Professional Dev...
15 questions
Ohms Law
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
