0% found this document useful (0 votes)
69 views4 pages

Class 12 Record Programs - Ay2024-251715102010-4

Uploaded by

9310 GAUTAM V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views4 pages

Class 12 Record Programs - Ay2024-251715102010-4

Uploaded by

9310 GAUTAM V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

THE PSBB MILLENNIUM SCHOOL

GST AND GERUGAMBAKKAM


COMPUTER SCIENCE (083)
RECORD PROGRAM

1. Write a menu driven program to compute,


a. Factorial of a given integer
b. Fibonacci series up to the given number n
c. Check whether the given integer is palindrome or not

2. Write a program to accept the list of marks for subjects from the user for n students and do
the following,
a. Print highest mark scored
b. Print the number of students scored less than 40
c. Compute the average marks
d. Compute the percentage of marks scored

3. Write a python program to input ‘n’ customers and their details like items bought, cost and
phone number etc. Store them in a dictionary and display all the details in a tabular form.

4. Write a program using function that takes amount – in – dollars and dollar – to – rupee
conversion price, it then returns the amount converted to rupees. Create a function in both
void and non-void forms.

5. Write a program using function to calculate volume of a box with appropriate default values
for its parameters. Your function should have the following input parameters,
a. Length of box
b. Width of box
c. Height of box

6. Write a program with a definition of a method COUNTNOW(PLACES) to find and display


those places names in which there are more than 5 characters after storing the names of places
in a dictionary.

7. Write an application based program (payroll, electricity bill, phone bill etc) to implement
LEGB rule and global keyword.

8. Write a program to implement the guessing game as per the following criteria.
a. To guess an integer number
b. To guess a floating point number
c. To guess a character from a list of character elements
9. Read a text file line by line and display each word separated by a #.

10. Write a program to find the number of upper case, no of lower case, number of digits, no of
vowels, no of consonants, no of special characters and numbers of lines in a text file.

11. Write a program to remove all the lines that contains the character ‘A’ or ‘a’ in a file and
write it to another file.

12. Create a file named “test_report.txt”, write a function capitalize_sentence() to create a


copy of file “test_report.txt” name it as “file.txt”, which should convert the first letter of the file
and the first alphabetic character following a full stop into upper case.

13. Take a sample of ten phishing e-mails (or any text file) and find most
commonly occurring word(s)

14.Write a menu driven program to perform all the basic operations using dictionary on student
binary file such as inserting, updating, searching and deleting a record.
a. Insert records with the following data (data includes USN, Student_Name, Class, Sec, Marks)
b. Ask for a student name and update their Marks
c. Search for a student record using USN
d. Delete records of students who have scored less than 13

15. Write a program to create a Binary file and read byte by byte using seek ( ) and tell ( ).
EG: Print the pointer position before and after reading all bytes from your file, go to beginning
of the file using seek ( ), Now read 5 bytes from the file and print the pointer position, read the
remaining bytes and print the pointer position.

16. Write a program to compute the Total salary of the employee and also calculate the size of
the binary file named “empfile.dat”. The file consists of the following fields: employee number,
employee name, basic salary, allowance. (HINT : Total salary = basic +allowance)

17. Write a program to read User_Id and Password for a CSV file, count the number of records
and search for a particular record based on User_Id.

18. Create a CSV file “groceries” to store information of different items existing in a shop. The
information is to be stored w.r.t each item code, name, price, qty. Write a program to accept
the data from user and store it permanently in CSV file.

19. Coach Abhishek stores the races and participants in a dictionary. Write a menu
based python program, with separate user defined functions to perform the
following operations:
⚫ Push the names of the participants of the dictionary onto a stack, where
the distance is more than 100 .
⚫ Pop and display the content of the stack

20. Write a Menu based program to add, delete and display the record of hostel using list as
stack Data Structure in Python. Record of Hostel Contains the following fields: Hostel Number,
Total Students and Total Rooms.
21. Write a Menu based program to push, pop and display the record of phone directory using
list as stack Data Structure in Python. Record of phone directory contains the following fields:
Pin code of the city and Name of the city.

SQL
22. Create the following table and execute the following queries
PRODUCT CLIENT
C_ID BrandName City P_ID P_ID ProductName Manufacturer Price
01 Maybelline Delhi FW05 TP01 Toner LAK 40
06 Loreal Mumbai BS01 FW05 Face Wash ABC 45
12 MAC Delhi SH06 BS01 Bronzer ABC 55
15 Sugar Delhi FW12 SH06 Shampoo XYZ 120
16 Kay Bangalore TP01 FW12 Face Wash XYZ 95

i. To create Database STD12


ii. To create table PRODUCT and CLIENT
iii. To insert values in the table Product and Client as given.
iv. To display the details of the table PRODUCT and table CLIENT.
v. To display C_ID, BrandName, P_ID and ProductName form table PRODUCT and CLIENT
vi. To display the details of Products whose Price is in the range of 50 to 100(Both values
included).
vii. To display the ClientName, City from table Client, and ProductName and Price from
table Product, with their corresponding matching P_ID.
viii. To increase the Price of all Products by 10
ix. To display sum of all price from table CLIENT.
x. To display maximum price of Face Wash from the table CLIENT
xi. To add a new column quantity in the table CLIENT.
xii. To display BrandName of PRODUCT that begins with MA.
xiii. To display the details of table PRODUCT in order of BrandName.
xiv. To display the count of manufactures from the table CLIENT.
xv. To display ProductName of manufacturer having price > 50.
xvi. To delete the records from table CLIENT whose price is less than 45.
xvii. To drop table product

PYTHON INTERFACE WITH MYSQL


SCHOOLBUS

RtNo Area_Covered Capacity NoOfStudents Distance Transporter Charges


1 A_001 100 120 10 Shivam Travels 100000
2 A_007 80 80 10 Anand Travels 85000
3 A_003 60 55 30 Anand Travels 60000
4 A_008 100 90 35 Anand Travels 100000
5 A_010 50 60 20 Bhalla Co 55000
6 A_004 70 80 30 Yadhav Co 80000
7 A_009 100 110 25 Yadhav Co 100000
8 A_005 40 40 20 Speed Travels 55000
9 A_002 120 120 10 Speed Travels 100000
10 A_006 100 100 20 Kishen Tour 95000

23. Write a python database connectivity script that creates and inserts value into the table
SCHOOLBUS of database STD12.
24. Write a python database connectivity script that display the records of table SCHOOLBUS
where distance is greater than 20.
25. Write a python database connectivity script to increase the charges by 100

26. Write a python database connectivity script that deletes records from the table SCHOOLBUS
that have name =”Yadhav Co”.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy