
Python Programming Quiz-04
Authored by pragya _CSE
Engineering
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the read() function do in Python?
Reads the entire file and returns it as a string.
Reads a single line from the file.
Reads the file as a list of lines.
Deletes the file content.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the readline() function do?
Reads the entire file and returns it as a string.
Reads a single line from the file.
Reads the file in reverse order.
Returns a list of all lines in the file.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is true about the readlines() function?
Reads the file as a list of lines.
Reads the file byte by byte.
Writes a list of lines to the file.
Reads a single character from the file.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What happens if read(5) is executed?
Reads the first 5 bytes/characters of the file.
Reads 5 lines from the file.
Reads the entire file.
Throws an error if the file is smaller than 5 bytes.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which function is used to move the file pointer to a specific position?
tell()
seek()
move()
pointer()
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does seek(0) do in a file?
Moves the pointer to the beginning of the file.
Moves the pointer to the end of the file.
Deletes the file content.
Reads the first character of the file.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which method is used to write a single string to a file?
write()
writelines()
append()
insert()
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
18 questions
LATEST GENERATION OF MOBILE COMMUNICATION
Quiz
•
KG - University
20 questions
Understanding Forces and Motion Concepts _ 6th
Quiz
•
6th Grade
20 questions
C++ OOPs Concepts & Inheritance Quiz
Quiz
•
University
20 questions
LATIHAN US GAMBAR DESAIN MESIN PART B
Quiz
•
12th Grade
20 questions
Data Visualization CT-5
Quiz
•
University
18 questions
LV2.2 Engines Test
Quiz
•
12th Grade
18 questions
PIM 1-2
Quiz
•
University
20 questions
Engineering Design Process
Quiz
•
10th Grade - University
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Engineering
15 questions
LOTE_SPN2 5WEEK3 Day 2 Itinerary
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
42 questions
LOTE_SPN2 5WEEK2 Day 4 We They Actividad 3
Quiz
•
Professional Development
6 questions
Copy of G5_U6_L3_22-23
Lesson
•
KG - Professional Dev...
20 questions
Employability Skills
Quiz
•
Professional Development