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
Similar Resources on Wayground
11 questions
Functions and Files

Quiz
•
Professional Development
10 questions
Very useful hotkeys

Quiz
•
Professional Development
10 questions
Perform Word Processing

Quiz
•
Professional Development
10 questions
PRETEST

Quiz
•
Professional Development
13 questions
Avaliação - Kodular

Quiz
•
Professional Development
6 questions
Laserfiche Level 2

Quiz
•
Professional Development
7 questions
Python / Datnes, klasses

Quiz
•
Professional Development
10 questions
pemrograman dasar

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
15 questions
Fun Random Trivia

Quiz
•
Professional Development
22 questions
Anne Bradstreet 1612-1672

Quiz
•
Professional Development
18 questions
Spanish Speaking Countries and Capitals

Quiz
•
KG - Professional Dev...
14 questions
Fall Trivia

Quiz
•
11th Grade - Professi...
15 questions
Disney Characters Quiz

Quiz
•
Professional Development
15 questions
Quiz to Highlight Q types & other great features in Wayground

Quiz
•
Professional Development