Professional Documents
Culture Documents
COMPUTER SCIENCE
PRACTICAL FILE
NAME: C.P.DHANUSH
CLASS: XII ‘A’
SCHOOL: KENDRIYA VIDYALAYA
OCF
ROLL NO: 12110
2
Date
Aim
1. To write a python program to pass a 12.6.21
list to a function and double the odd
values and half
Even values of a list and display list
elements after changing.
Practical 1
Aim:To write a python program to pass list to a function and
double the odd values and half even values of a list and display list
element after changing.
Output :
Practical 2
6
Output :
Practical 3
Aim:To write a Python program to function with key and value, and
update value at that key in dictionary entered by user .
Code:
Output :
Practical 4
Aim:To write a Python program to pass a string to a
function and count how many vowels present in the string.
Code:
Output :
Practical 5
Aim:To write a Python program to generator (Random
Number) that generates random numbers between 1 and 6
(simulates a dice) using user defined function.
Code:
9
Output :
Practical 6
Aim:To write a menu driven python program to
implement 10 python mathematical functions.
Software Used:IDLE(Python 3.8 32-bit)
Code:
10
Output :
11
Practical 7
12
Code:
Output:
13
Practical 8
14
Output :
15
Practical 9
16
Code:
Output:
Practical 10
18
Code:
Output:
Practical 11
20
Code:
Output:
Practical 12
22
Code:
Output:
Practical 13
Aim: To write a python program to create a binary file
with name and roll number. Search for a given roll number
24
Output :
25
Practical 14
Aim: To write a python program to create a dictionary with roll number, name
and marks. Accept 5 records from the user and write them into a binary file.
26
Code:
Output:
Practical 15
Aim:To write a python program to create a CSV file by
entering user-id and password, read and search the
password for given user-id.
27
Code:
Output :
28
************THANK
YOU************