AI Prompt Builder

Generate a copy-paste ready prompt for ChatGPT, Claude, Gemini, or DeepSeek
Study Notes Prompt PPT Slides Prompt
Configure Prompt
Describe class, board, and ability level
Selected Lecture
Lecture #24
File basics, paths, modes, seek and tell PYQ part 1
File basics, paths, modes, seek and tell
PYQ reference preview 14 included 0 excluded

Review every matched question before generating. Flag a wrongly categorised question to quarantine it from both study and PPT prompts until it is corrected in CBSE Paper Analyzer.

Included in reference ID 6475 · 2021 · 1 mark(s)
Which of the following option is not correct? a) if we try to read a text file that does not exist, an error occurs. b) if we try to read a text file that does not exist, the file gets created. c) if we try to write on a text file that does not exist, no error occurs. d) if we try to write on a text file that does not exist, the file gets created.
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6478 · 2021 · 1 mark(s)
A text file student.txt is stored in the storage device. Identify the correct option out of the following options to open the file in read mode. i. myfile = open('student.txt','rb') ii. myfile = open('student.txt','w') iii. myfile = open('student.txt','r') iv. myfile = open('student.txt') a) only i b) both i and iv c) both iii and iv d) both i and iii
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6483 · 2021 · 1 mark(s)
What is the significance of the tell() method? a) tells the path of file b) tells the current position of the file pointer within the file c) tells the end position within the file d) checks the existence of a file at the desired location
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6485 · 2021 · 1 mark(s)
Syntax of seek function in Python is myfile.seek(offset, reference_point) where myfile is the file object. What is the default value of reference_point? a) 0 b) 1 c) 2 d) 3
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6518 · 2021 · 1 mark(s)
Consider the following directory structure. (Root: School → Subdirectories: Academics [contains Syllabus.jpg], Examination [contains Result.png], Sports [contains Achievement.jpg]) Suppose root directory (School) and present working directory are the same. What will be the absolute path of the file Syllabus.jpg? a) School/syllabus.jpg b) School/Academics/syllabus.jpg c) School/Academics/../syllabus.jpg d) School/Examination/syllabus.jpg
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6532 · 2022 · 1 mark(s)
Which of the following mode in file opening statement results or generates an error if the file does not exist? a) a+ b) r+ c) w+ d) None of the above
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6537 · 2022 · 1 mark(s)
The correct syntax of seek() is: a) file_object.seek(offset [, reference_point]) b) seek(offset [, reference_point]) c) seek(offset, file_object) d) seek.file_object(offset)
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6092 · 2023 · 1 mark(s)
Which of the following mode keeps the file offset position at the end of the file ? (a) r+ (b) x (c) w (d) a
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6097 · 2023 · 1 mark(s)
The syntax of seek( ) is file object.seek(offset[,reference point] ) What is the default value of reference point ? (a) 0 (b) 1 (c) 2 (d) 3
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6289 · 2023 · 1 mark(s)
Which of the following modes in Python creates a new file, if file does not exist and overwrites the content, if the file exists ? (a) r+ (b) r (c) w (d) a
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6294 · 2023 · 1 mark(s)
The correct syntax of tell() is: (a) tell.file object () (b) file object.tell() (c) tell.file object (1) (d) file object.tell1(1)
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6584 · 2023 · 1 mark(s)
Which of the following functions changes the position of file pointer and returns its new position? a) flush() b) tell() c) seek() d) offset()
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6313 · 2023 · 3 mark(s)
(a) Write a function in Python that displays the book names having 'Y' or 'y' in their name from a text file "Bookname.txt". Example : If the file 'Bookname.txt' contains the names of following books : One Hundred Years of Solitude The Diary of a Young Girl On the Road After execution, the output will be : One Hundred Years of Solitude The Diary of a Young Girl
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Included in reference ID 6600 · 2023 · 3 mark(s)
Write a function in Python to read a text file, Alpha.txt and displays those lines which begin with the word 'You'.
File Handling → File basics paths modes seek and tell · Concept U1_FILE_BASICS_MODES
Select a lecture and generate your AI prompt

Pick a lecture from the panel on the left, configure the board and student level, then click Generate Prompt. The result includes PYQ data, frequency analysis, exam trends, and a full 15-section teaching package request — ready to paste into any AI assistant.

ChatGPT Claude Gemini DeepSeek
PYQ Analysis
Frequency, marks & high-yield concepts
Lecture Flow
Exact time-allocation plan
15 Sections
From objectives to ranked exam questions
Export
Copy or download as .txt