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 #28
Text file reading writing searching and counting PYQ part 1
Text file reading writing searching and counting
PYQ reference preview 9 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 6476 · 2021 · 1 mark(s)
Which of the following options can be used to read the first line of a text file Myfile.txt? a) myfile = open('Myfile.txt'); myfile.read() b) myfile = open('Myfile.txt','r'); myfile.read(n) c) myfile = open('Myfile.txt'); myfile.readline() d) myfile = open('Myfile.txt'); myfile.readlines()
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6477 · 2021 · 1 mark(s)
Assume that the position of the file pointer is at the beginning of 3rd line in a text file. Which of the following option can be used to read all the remaining lines? a) myfile.read() b) myfile.read(n) c) myfile.readline() d) myfile.readlines()
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6498 · 2021 · 1 mark(s)
Suppose content of 'Myfile.txt' is: Twinkle twinkle little star How I wonder what you are Up above the world so high Like a diamond in the sky What will be the output of the following code? myfile = open("Myfile.txt") data = myfile.readlines() print(len(data)) myfile.close() a) 3 b) 4 c) 5 d) 6
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6511 · 2021 · 1 mark(s)
Suppose content of 'Myfile.txt' is: Humpty Dumpty sat on a wall Humpty Dumpty had a great fall All the king's horses and all the king's men Couldn't put Humpty together again What will be the output of the following code? myfile = open("Myfile.txt") record = myfile.read().split() print(len(record)) myfile.close() a) 24 b) 25 c) 26 d) 27
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6513 · 2021 · 1 mark(s)
Suppose content of 'Myfile.txt' is: Honesty is the best policy. What will be the output of the following code? myfile = open("Myfile.txt") x = myfile.read() print(len(x)) myfile.close() a) 5 b) 25 c) 26 d) 27
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6514 · 2021 · 1 mark(s)
Suppose content of 'Myfile.txt' is: Culture is the widening of the mind and of the spirit. What will be the output of the following code? myfile = open("Myfile.txt") x = myfile.read() y = x.count('the') print(y) myfile.close() a) 2 b) 3 c) 4 d) 5
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6516 · 2021 · 1 mark(s)
Suppose content of 'Myfile.txt' is: Ek Bharat Shreshtha Bharat What will be the output of the following code? myfile = open("Myfile.txt") vlist = list("aeiouAEIOU") vc=0 x = myfile.read() for y in x: if(y in vlist): vc+=1 print(vc) myfile.close() a) 6 b) 7 c) 8 d) 9
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6517 · 2021 · 1 mark(s)
Suppose content of 'Myfile.txt' is: Twinkle twinkle little star How I wonder what you are Up above the world so high Like a diamond in the sky Twinkle twinkle little star What will be the output of the following code? myfile = open("Myfile.txt") line_count = 0 data = myfile.readlines() for line in data: if line[0] == 'T': line_count += 1 print(line_count) myfile.close() a) 2 b) 3 c) 4 d) 5
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6519 · 2021 · 1 mark(s)
Assume the content of text file, 'student.txt' is: Arjun Kumar Ismail Khan Joseph B Hanika Kiran What will be the data type of data_rec? myfile = open("Myfile.txt") data_rec = myfile.readlines() myfile.close() a) string b) list c) tuple d) dictionary
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
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