
CUET Level - II Computer Science(7/11/2023)
Authored by Bodhi School
Computers
12th Grade
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is a function/method of the pickle module?
reader( )
writer( )
load ( )
read( )
Answer explanation
Explanation: The load () method of python pickle module reads the pickled byte
stream of one or more python objects from a file object. When multiple objects
are expected from the byte steam, the load() method should be called multiple
times.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statement is not correct?
We can write content into a text file opened using ’w’ mode.
We can write content into a text file opened using ‘w+’ mode.
We can write content into a text file opened using ‘r ‘ mode.
We can write content into a text file opened using ‘r+’ mode.
Answer explanation
opens the file in read-only mode. So, we can’t write any data to
the file.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
3. Which of the following option is the correct Python statement to read and display the first 10 characters of a text file “ Notes.txt”?
(a) F= open(‘Notes.txt’); print(F.load(10))
F= open(‘Notes.txt’); print(F.dump(10))
F= open(‘Notes.txt’); print(F.read(10))
F= open(‘Notes.txt’); print(F.write(10))
Answer explanation
read() method in python is used to read at most n bytes from the
file associated with the given file descriptor. If the end of the file has been
reached while reading bytes from the given file descriptor, os.read() method will
return an empty bytes object for all bytes left to be read.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is not a correct python statement to open a text file
“Notes.txt” to write content onto it?
F= open(‘Notes.txt’, ‘w’)
F= open(‘Notes.txt’, ‘a’)
F= open(‘Notes.txt’, ‘A+’)
F= open(‘Notes.txt’, ‘w’+)
Answer explanation
Option C is invalid because ‘A ‘ is an invalid mode in python.
‘w’ opens a file for write mode.
‘a’ opens a file for append mode.
‘w+’ opens a file for both writing and reading.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
A text file opened using following statement:
MyFile= open(‘Notes.txt’)
Which of the following is the correct python statement to close it?
MyFile= close(‘Notes.txt’)
MyFile= close(‘Notes.txt’)
Close.MyFile()
MyFile.close()
Answer explanation
Python file method close() closes the opened file. Its syntax is
<file object>.close()
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following option is the correct usage for the tell( ) of a file object?
It places the file pointer at the desired offset in a file.
It returns the entire content of a file.
It returns the byte position of the file pointer as an integer.
It tells the details about the file.
Answer explanation
tell() method can be used to get the position of File Handle. tell()
method returns current position of file object. This method takes no parameters
and returns an integer value. Initially file points to the beginning of the file (if not
opened in append mode).
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statement is incorrect in the context of pickled binary
file?
csv module is used for reading and writing objects in binary files.
pickle module is used for reading and writing objects in binary file.
load () of the pickle module is used to rad objects.
dump() of the pickle module is used to write objects.
Answer explanation
The csv module implements classes to rad and write tabular data in
CSV format. CSV files are text files so csv module can’t be used to read and write
objects to binary files.
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
15 questions
1.1 Computer Systems Essential Knowledge
Quiz
•
9th - 12th Grade
12 questions
ICT Computer Basics pt1
Quiz
•
10th - 12th Grade
17 questions
Email Lớp 6
Quiz
•
6th Grade - University
12 questions
website design elements
Quiz
•
12th Grade
10 questions
ICT as Social Change
Quiz
•
12th Grade
10 questions
KRIPTOGRAFI DALAM PENGKOMPUTERAN
Quiz
•
10th - 12th Grade
11 questions
Packet Switching and Encryption
Quiz
•
10th - 12th Grade
10 questions
HTML & Google Site Seatwork
Quiz
•
12th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade
18 questions
Success Strategies
Quiz
•
9th - 12th Grade
10 questions
Valentine's Day Trivia
Quiz
•
9th - 12th Grade