Practicalfile Format CS Xii

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

LANCER’S CONVENT SCHOOL

PRACTICAL RECORD FILE


COMPUTER SCIENCE (083)
2023-24

NAME:-

CLASS:- XII

ADM NO. :-12379

BOARD ROLL NO:-

TEACHER INCHARGE:- MS.REKHA MAHAJAN


CERTIFICATE
This is to certify that Anumaan Whig , Admission No. 12379

Board Roll No: of Class XII , SESSION: 2023-2024

has prepared the Practical file as per the prescribed Practical syllabus.

COMPUTER SCIENCE(083)

Class XII (C.B.S.E.)

Under my supervision and I am completely satisfied by the


performance.
I wish her/him all the success in life

SIGNATURE OF TEACHER
INDEX
S.NO. PROGRAM SIGN.
01. Write a program that accepts a string as a parameter to a function
and counts the number of upper case letters and lower case letters.
02. Write a Python program to find the factorial of a number using default
parameters. (Include proper error condition for a negative number as
input.)

03. Write a program to demonstrate the concept of the scope of a


variable.
04. Write a program to create a function & input 10 numbers from the
user and count & return how many of these are whole numbers.
05. Create a function calculator() to perform basic mathematical
operations and return multiple values and print them individually.
06. Read a text file and display the number of
vowels/consonants/uppercase/lowercase characters in the file.
07. Copy the contents of one text file to another text file by removing
all the lines that contain the character 'a'.
08. Create a binary file with name and roll number. Search for a given
roll number and display the name, if not found display an
appropriate message.
09. Create a binary file with roll number, name, and marks. Input a roll
number and update the marks.
10. Write a Python script to create a dictionary with player's name and
their scores. Write a function that accepts this dictionary as an
argument and displays the name of the player with the highest
score.
11. Create a binary file GIFT having GiftID, gift name, remarks and
price and display details of those gifts, which has remarks as “ÖN
DISCOUNT”.
12 Write a Python script to read a VEHICLE.CSV file containing
Vehicle_Id, VehicleName, ManufatureYear having a comma as a
delimiter. Display those records where the voter age is more than
65. Display any number of records from the bottom.
13. Create a CSV file by entering user-id and password, read and
search for the password for the given user-id.

14. Write a program to count the number of records present in


“customers.csv” file.
15. Write a Python menu-based program to implement a stack using
the list.
1. Push 2. Pop 3. Peek 4. Show Stack 5.Exit
16. Write a random number generator that generates random numbers
between 1 and 6 (simulates a dice).
17. Write a menu-driven Python program to implement a stack storing
employee number, name and basic using a list data-structure.
18. MySQL Commands based on Table: SchoolBus
19. MySQL Commands based on two tables EMPLOYEE and DEPT
with proper primary key & foreign key.
20. MySQL Commands based on two tables PRODUCT and CLIENT,
with proper primary key & foreign key
21. MySQL Commands based on Table: Tech_Courses
22. Integrate MySQL with Python by importing a suitable module and
then create the table product with the following details
productno,productname,price,purchasedate,quantity , add five
records in the table, and then retrieve all the records in proper
format in Python.
23. Perform a delete query on the table products to delete the product
having price greater than 100 using Python MySQL connectivity.
24. Write a program to connect with database employee and table
emp with following fields empno,empname ,dept,salary and store
record of an employee and then display it based on employee
number entered by the user.
25. Write a program to connect with database employee and then
update the department and salary (as per user requirements) after
accepting employee number from the user.
Q10) Write a Python script to create a dictionary with player's name and their scores. Write a function that accepts

this dictionary as an argument and displays the name of the player with the highest score

INPUT
Q11) Create a binary file GIFT having GiftID, gift name, remarks and price and display details of those gifts, which has remarks as
“ÖN DISCOUNT”.

INPUT

OUTPUT:
Q12) Write a Python script to read a VEHICLE.CSV file containing Vehicle_Id, VehicleName, ManufatureYear

having a comma as a delimiter. Display those records where the voter age is more than 65. Display any number

of records from the bottom.

INPUT:

OUTPUT:
Q13) Create a CSV file by entering user-id and password, read and search for the password for the given
user-id.

INPUT ::

OUTPUT:
Q14) Write a program to count the number of records present in “customers.csv”

file

INPUT:

OUTPUT:
Q15) Write a Python menu-based program to implement a stack using the list.

1. Push 2. Pop 3. Peek 4. Show Stack 5.Exit

INPUT:
Q16) Write a random number generator that generates random numbers between

1 and 6 (simulates a dice)

INPUT:

OUTPUT:
Write a menu-driven Python program to implement a stack storing employee
Q17)
number, name and basic using a list data-structure.
Q18) MySQL Commands based on Table: SchoolBus
Q19) MySQL Commands based on two tables EMPLOYEE and DEPT with proper
primary key & foreign key.
Q20) MySQL Commands based on two tables PRODUCT and CLIENT, with proper
primary key & foreign key
Q21) MySQL Commands based on Table: Tech_Courses
Q22) Integrate MySQL with Python by importing a suitable module and then create
the table product with the following details
productno,productname,price,purchasedate,quantity , add five records in the table,
and then retrieve all the records in proper format in Python.

INPUT:
OUTPUT:
Q23) Perform a delete query on the table products to delete the product having price
greater than 100 using Python MySQL connectivity
Q24) Write a program to connect with database employee and table emp with
following fields empno,empname ,dept,salary and store record of an employee and
then display it based on employee number entered by the user
Q25) Write a program to connect with database employee and then update the department and salary (as
per user requirements) after accepting employee number from the user.

You might also like