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 #30
Text file reading writing searching and counting PYQ part 3
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 6158 · 2024 · 3 mark(s)
(a) Write the user defined function count_words() in Python to count the number of words in a text file "Story.txt".
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6159 · 2024 · 3 mark(s)
(b) Write the user defined function display() in Python to read the content of a text file "Story.txt" and display those words which are less than 4 characters.
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6358 · 2024 · 3 mark(s)
(a) Write a method/function COUNTWORDS() in Python to read contents from a text file DECODE.TXT, to count and return the occurrence of those words, which are having 5 or more characters.
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6359 · 2024 · 3 mark(s)
(b) Write a method/function COUNTLINES() in Python to read lines from a text file CONTENT.TXT, and display those lines, which have @ anywhere in the line. For example : If the content of the file is : Had an amazing time at the concert last night with @MusicLoversCrew. Excited to announce the launch of our new website! G20 @ India The method/function should display Had an amazing time at the concert last night with @MusicLoversCrew G20 @ India
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6646 · 2024 · 3 mark(s)
A) Write a Python function that displays all the words containing @cmail from a text file "Emails.txt".
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6647 · 2024 · 3 mark(s)
B) Write a Python function that finds and displays all the words longer than 5 characters from a text file "Words.txt".
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6172 · 2024 · 4 mark(s)
Write a program in Python to read the content of a text file Story.txt and count and display the number of lines that start with the letter 'A'.
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6378 · 2025 · 1 mark(s)
A text file 'song.txt' contains the following contents in it : Life goes on as it never ends What will be the output of the following code snippet ? f1=open("song.txt","r") s1=f1.read(5) s2=f1.readline(4) s3=f1.read(3) print(s1,s3,sep="#") (A) goes# on (B) Life #goes# on (C) Life # on (D) Error
File Handling → Text file reading writing searching and counting · Concept U1_TEXT_FILE_OPERATIONS
Included in reference ID 6203 · 2025 · 3 mark(s)
Write a user defined function in Python named COUNT() which counts and displays the number of lines which do not start with the vowels 'A' or 'E' in the file, "Paragraph.txt".
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