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 6605 · 2023 · 4 mark(s)
Vedansh is a Python programmer working in a school. For the Annual Sports Event, he has created a csv file named Result.csv, to store the results of students in different sports events. The structure of Result.csv is:
[St_Id, St_Name, Game_Name, Result]
Where:
St_Id is Student ID (integer)
ST_name is Student Name (string)
Game_Name is name of game in which student is participating (string)
Result is result of the game whose value can be either 'Won', 'Lost' or 'Tie'
For efficiently maintaining data of the event, Vedansh wants to write the following user defined functions:
Accept() – to accept a record from the user and add it to the file Result.csv. The column headings should also be added on top of the csv file.
wonCount() – to count the number of students who have won any event.
As a Python expert, help him complete the task.
(b) Why it is important to close a file before exiting ?
Write a program in Python that defines and calls the following user defined functions :
(i) Add_Book(): Takes the details of the books and adds them to a csv file 'Book.csv'. Each record consists of a list with field elements as book_ID, B_name and pub to store book ID, book name and publisher respectively.
(ii) Search_Book(): Takes publisher name as input and counts and displays number of books published by them.
(a) Write a point of difference between append (a) and write (w) modes in a text file.
Write a program in Python that defines and calls the following user defined functions :
(i) Add_Teacher() : It accepts the values from the user and inserts record of a teacher to a csv file "Teacher.csv". Each record consists of a list with field elements as T_id, Tname and desig to store teacher ID, teacher name and designation respectively.
(ii) Search_Teacher() : To display the records of all the PGT (designation) teachers.
(ii) Count_Device() : To count and display number of peripheral devices, whose price is less than or equal to 1000.
Write the user defined function to modify the quantity of a product.
The function should accept the product number, and the new quantity as arguments and update the quantity of that product in a CSV file "Product.csv".
Mr. Mahesh is a Python Programmer working in a school. He has to maintain the records of the sports students. He has created a csv file named sports.csv, to store the details. The structure of sports.csv is :
[sport_id, competition, prize_won]
where
sport_id, is Sport id (integer)
competition is competition name (string)
prize_won is ("Gold", "Silver", "Bronze")
Mr. Mahesh wants to write the following user-defined functions :
Add_detail() : to accept the detail of a student and add to a csv file, "sports.csv".
Count_Medal() : to display the name of competitions in which students have won "Gold" medal.
Help him in writing the code of both the functions.
A csv file "Happiness.csv" contains the data of a survey. Each record of the file contains the following data:
- Name of a country
- Population of the country
- Sample Size (Number of persons who participated in the survey in that country)
- Happy (Number of persons who accepted that they were Happy)
For example, a sample record of the file may be: ['Signiland', 5673000, 5000, 3426]
Write the following Python functions to perform the specified operations on this file:
(I) Read all the data from the file in the form of a list and display all those records for which the population is more than 5000000.
(II) Count the number of records in the file.
Consider the table RESULT given below.
| ROLL | SUBJECT | MARKS |
|------|---------|-------|
| S01 | Physics | 90 |
| S02 | Chemistry | 98 |
| S03 | Maths | 80 |
| S04 | Physics | 95 |
| S05 | Chemistry | 75 |
| S06 | Maths | 97 |
Write a program in Python to write the above data in a CSV file named RESULT.csv and display the records of all those students who are getting marks more than 80.
Suman is an intern at a software startup. The company has assigned her a task to create a CSV file named CLUB.CSV, to store the records of the Club members. After discussing with Club Incharge, Suman has planned to store the following content of members in the file CLUB.CSV :
[Mno, Name, Mobile, Fee]
Where Mno – Member Number, Name – Name of the Member, Mobile – Member's Mobile Number, Fee – Fee amount
Assuming you are asked to help Suman in her assignment, write a Python code for performing the following tasks with the help of user-defined functions :
NewMembers() : to accept records of members from the user and add them to the file CLUB.CSV
PriorityMember() : to find and display those members from the file CLUB.CSV, who are paying Fee more than 35000.
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.
ChatGPTClaudeGeminiDeepSeek
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
Reset All Progress?
This will clear all Done and Missed marks and rebuild the schedule from scratch.
A backup will be created automatically before resetting. You can restore it from the Backups page.