Syllabus
O Level
M1 R5: Information Technology Tools and Network Basics
Introduction to Computers
Office Automation Tools
Internet and Web Technologies
Networking Fundamentals
M2 R5: Web Designing and Publishing
HTML
CSS
Javascript
Web Hosting And Publishing
M3 R5: Programming and Problem Solving through Python
Introduction to Programming
Python Programming
Data Structures in Python
File Processing in Python
M4 R5: Internet of Things (IoT) and Its Applications
Introduction to IoT
IoT Architecture
IoT Applications
IoT Security and Challenges | Soft Skills
Courses
Under Graduate Courses
BA
BCA
B.COM
Post Graduate Courses
MCA
MBA
M.COM
MA
M.SC.(MATHS)
MSW
Institutional Courses
DCA
ADCA
DFA
DOAP
TALLY PRIME
JAVA
PYTHON
CCA
C Languages
Job Oriented Courses
Digital Marketing
Full Stack Development
Data Science
Cybersecurity and Ethical Hacking
Blockchain Development
Cloud Computing
Artificial Intelligence (AI) and Machine Learning
Government Courses
CCC
O LEVEL
A LEVEL
Mock Test
M1 R5: Information Technology Tools and Network Basics
M2 R5: Web Designing and Publishing
M3 R5: Programming and Problem Solving through Python
M4 R5: Internet of Things (IoT) and Its Applications
Old Papers
2025
New!
2024
New!
2023
New!
2022
New!
2021
New!
2020
New!
2019
New!
2018
New!
2017
New!
2016
New!
2015
New!
2014
New!
2013
New!
2012
New!
2011
New!
Assignments
HTML
New!
CSS
New!
Javascript
New!
Python
New!
Log in
Sign Up
O Level Papers!
M3 R5: Programming and Problem Solving through Python
File Processing in Python
Set 3
25
See Explanation !
1
Identify the correct function call to read first 5 character of the file from the beginning
शुरुआत से फ़ाइल के पहले 5 अक्षर को पढ़ने के लिए सही फ़ंक्शन कॉल की पहचान करें
f.read(5)
f.read()=5
f.readline(5)
f.readlines(5)
Next Question
25
See Explanation !
2
Work of tell() method in file processing is
फाइल प्रोसेसिंग में tell() फंक्शन का कार्य है
Tells you the current position within the file.
Tells the size of file you read
Tells the start position of the file.
Tells the end position of the file.
Previous Question
Next Question
25
See Explanation !
3
in python which function is used to read CSV file
पायथन में CSV फ़ाइल को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
csv.reader(file)
csv.read(file)
csv.readcsv(file)
csv.readcsvdata(file)
Previous Question
Next Question
25
See Explanation !
4
What will be the output of : infile.read(2)
निम्नलिखित कोड का आउटपुट क्या होगा? infile.read(2)
Read two words from file
Read two line from file
Read two character / two bytes
count the number of '2' in file
Previous Question
Next Question
25
See Explanation !
5
Which denotes file binary mode?
फ़ाइल बाइनरी मोड को कौन दर्शाता है?
r
rb
w
r+
Previous Question
Next Question
25
See Explanation !
6
which is a correct way to open a file in python
पायथन में फ़ाइल खोलने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
file_object=open(file_name,mode)
open(file_object,file_name,mode)
file_open(file_object,file_name,mode)
file_object=file_open(file_name,mode)
Previous Question
Next Question
25
See Explanation !
7
Which of the following is not a valid mode to open a file?
निम्नलिखित में से कौन सा फ़ाइल खोलने के लिए वैध मोड नहीं है?
ab
rw
r+
w+
Previous Question
Next Question
25
See Explanation !
8
In which format python file considered
पाइथन फ़ाइल को किस प्रारूप में माना जाता है
giga bytes
mega bytes
byte
bits
Previous Question
Next Question
25
See Explanation !
9
What is unpickling?
अनपिकलिंग क्या है
It is used for object serialization
It is used for object de-serialization
change the string value to number
extract the list element in simple variable
Previous Question
Next Question
25
See Explanation !
10
What is the use of seek() method in files?
फाइलों में seek() फंक्शन का क्या उपयोग है?
sets the file's current position at the offset
sets the file's previous position at the offset
sets the file's current position within the file
None of these
Previous Question
Next Question
25
See Explanation !
11
What is the default mode for files in Python?
पायथन में फ़ाइलों के लिए डिफ़ॉल्ट मोड क्या है?
Write
Read
Append
Read and Write Both
Previous Question
Next Question
25
See Explanation !
12
What keyword is used in Python to raise exceptions?
एक्सेप्शन उत्पन्न करने के लिए पायथन में किस कीवर्ड का उपयोग किया जाता है?
raise
goto
try
except
Previous Question
Next Question
25
See Explanation !
13
What will be the output of the following Python expression? print(round(4.576))
निम्नलिखित पायथन एक्सप्रेशन का आउटपुट क्या होगा? print(round(4.576))
4.5
5
4
4.6
Previous Question
Next Question
25
See Explanation !
14
What will be the output of the following Python code? import datetime d=datetime.date(2017,6,18) print(d)
निम्नलिखित पायथन कोड का आउटपुट क्या होगा? import datetime d=datetime.date(2017,6,18) print(d)
Error
2017-06-18
18-06-2017
06-18-2017
Previous Question
Next Question
25
See Explanation !
15
What will be the output of the following Python code if the system date is 18th August, 2016? import datetime d=datetime.date.today() print(d.month)
यदि सिस्टम की तारीख 18 अगस्त, 2016 है, तो निम्नलिखित पायथन कोड का आउटपुट क्या होगा? import datetime d= datetime.date.today () print(d.month)
August
Aug
08
8
Previous Question
Next Question
25
See Explanation !
16
What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)? import datetime tday=datetime.date.today() print(tday)
यदि सिस्टम की तारीख 18 जून, 2017 (रविवार) है, तो निम्नलिखित पायथन कोड का आउटपुट क्या होगा? import datetime tday = datetime.date.today () print(tday)
18-06-2017
06-18-2017
2017-06-18
Error
Previous Question
Next Question
25
See Explanation !
17
What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)? import datetime tday=datetime.date.today() print(tday.weekday())
यदि सिस्टम दिनांक 18 जून, 2017 (रविवार) है, तो निम्नलिखित पायथन कोड का आउटपुट क्या होगा? import datetime tday=datetime.date.today() print(tday.weekday())
6
1
0
7
Previous Question
Next Question
25
See Explanation !
18
What will be the output of the following Python code if the system date is 21st June, 2017 (Wednesday)? import datetime tday=datetime.date.today() print(tday.isoweekday())
यदि सिस्टम दिनांक 21 जून, 2017 (बुधवार) है, तो निम्नलिखित पायथन कोड का आउटपुट क्या होगा? import datetime tday=datetime.date.today() print(tday.isoweekday())
Wed
Wednesday
2
3
Previous Question
Next Question
25
See Explanation !
19
What will be the output of the following Python code if the system date is: 6/19/2017 import datetime tday=datetime.date.today() tdelta=datetime.timedelta(days=10) print(tday+tdelta)
यदि सिस्टम दिनांक है: 6/19/2017 तो निम्नलिखित पायथन कोड का आउटपुट क्या होगा import datetime tday=datetime.date.today() tdelta=datetime.timedelta(days=10) print(tday+tdelta)
2017-16-19
2017-06-9
2017-06-29
Error
Previous Question
Next Question
25
See Explanation !
20
Which of the following functions can be used to find the coordinated universal time, assuming that the datetime module has already been imported?
निम्नलिखित कार्यों में से किसको कोआर्डिनेट यूनिवर्सल समय का पता लगाने के लिए यूज़ किया जा सकता है, यह मानते हुए कि डेटाइम मॉड्यूल पहले ही इम्पोर्ट किया जा चुका है?
datetime.utc()
datetime.datetime.utc()
datetime.utcnow()
datetime.datetime.utcnow()
Previous Question
Next Question
25
See Explanation !
21
What will be the output of the following Python code? import time print(time.asctime())
निम्नलिखित पायथन कोड का आउटपुट क्या होगा? import time print(time.asctime())
Current date only
UTC time
Current date and time
Current time only
Previous Question
Next Question
25
See Explanation !
22
The sleep function (under the time module) is used to ___________
स्लीप फ़ंक्शन (टाइम मॉड्यूल के अंडर) ___________ के लिए यूज़ किया जाता है
Pause the code for the specified number of seconds
Return the specified number of seconds, in terms of milliseconds
Stop the execution of the code
Return the output of the code had it been executed earlier by the specified number of seconds
Previous Question
Next Question
25
See Explanation !
23
To include the use of functions which are present in the random library, we must use the option:
उन फ़ंक्शन का उपयोग शामिल करने के लिए जो रैंडम लाइब्रेरी में मौजूद हैं, हमें किस ऑप्शन का यूज़ करना चाहिए:
import random
random.h
import.random
random.random
Previous Question
Next Question
25
See Explanation !
24
What will be the output of the following Python function, assuming that the random module has already been imported? import random random.uniform(3,4)
यह मानते हुए कि random मॉड्यूल पहले से ही आयात किया जा चुका है, निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा? import random random.uniform(3,4)
Error
Either 3 or 4
Any integer other than 3 and 4
Any decimal value between 3 and 4
Previous Question
Next Question
25
See Explanation !
25
What will be the output of the following Python function if the random module has already been imported? import random print(random.randint(3.5,7))
यदि रैंडम मॉड्यूल पहले से ही आयात किया गया है, तो निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा? import random print(random.randint(3.5,7))
Error
Any integer between 3.5 and 7, including 7
Any integer between 3.5 and 7, excluding 7
The integer closest to the mean of 3.5 and 7
Previous Question