Bhavishya Kataria project file on python
Bhavishya Kataria project file on python
COMPUTER SCIENCE.
CERTIFICATE
PRINCIPAL
3
ACKNOWLEDGEM
ENT
It is with pleasure that I acknowledge my
sincere gratitude to our teacher, MRS.
RANI SALONI who taught and undertook
the responsibility of teaching the subject
computer science. I have been greatly
benefited from his classes.
I am especially indebted to our Honourable
Principal MRS. NIMMI who has always been
a source of encouragement and support and
without whose inspiration this project would
not have been a successful I would like to
place on record heartfelt thanks to him.
I also acknowledge with a deep sense of
reverence, my gratitude towards my parents,
other faculty members of the school and
friends for their valuable suggestions given to
me in completing the project
4
SIGNATURe
index
Sno Name of practical Page Sign of
. no. teacher
1. Write a program to print the Fibonacci Series using 1
functions.
2. Write a program to check whether the string is a 2
palindrome or not using functions.
3. Write a random number generator that generates 3
random numbers between 1 and 6(simulates dice)
4. Write a program to create a library in python and 4
import in a program.
5. Read a text file line by line and display each word 5
separated by “#”.
6. Remove all the lines that contain the character “a” in a file 6
and write it to another file.
7. Read a text file and display the numbers of vowels, 7
consonants, uppercase and lowercase characters in the file.
8. Write a program that reads a text file and create a new file 8
after adding “ing” to all words ending with “t”, “d” and “e”.
9. Create a binary file with name and roll number. Search for a 9
given roll number and display the name, if not found display
appropriate message.
10. Create a binary file with name, roll number and marks. Input 10-
a roll number and update the marks. 11
11. Write a program to create a file CAMERA.csv having fields 12-
Model number, Mega Pixel, Zoom and Price by using 13
comma as a delimiter and display its content.
12. Write a program to read VOTERS.csv file containing voters 14-
5
Program1:
Write a program to print the Fibonacci Series using functions.
6
*INPUT
*OUTPUT
Program2:
Write a program to check whether the string is a palindrome or not
using functions.
7
*INPUT
*OUTPUT
8
Program3:
Write a random number
generator that generates random
numbers between 1 and
6(stimulates a dice).
*INPUT
*OUTPUT
9
Program4:
Write a program to create a library in python and import it in a
program.
*INPUT
*OUTPUT
10
11
Program5:
Read a text file line by line and display each word separated by a “#”.
*INPUT
*OUTPUT
12
Program6:
Remove all the lines that contain the character “a” in a file and write
it to another file.
*INPUT
*OUTPUT
#Original file
#New file#####
#New file
13
Program7:
Read a text file and display the numbers of vowels, consonants, uppercase
and lowercase characters in the file.
*INPUT
*OUTPUT
Program8:
Write a program that reads a text file and create a new file after adding
“ing” to all the words ending with “t”, “e” and “d”.
14
*INPUT
*OUTPUT
15
Program9:
Create a binary file with name and roll number. Search for a given roll
number and display the name, if not found display appropriate message.
*INPUT
16
*OUTPUT
Program10:
17
Create a binary file with roll number, name and marks. Input a roll
number and update the marks.
*INPUT
18
*OUTPUT
T
19
Program11:
Write a program to create a file CAMERA.csv
having fields Model No, Mega Pixel, Zoom and
Price using comma as a delimiter and display its
content
*INPUT
20
*OUTPUT
Program12:
21
*OUTPUT
22
Program13:
Write a Python program to implement a stack
using a list data-structure
23
*INPUT
24
#Output
25
Program14:
26
*INPUT
*OUTPUT
27
SQL
Queries
Program15:
Create a database
“My_Database” and create
tables – “Student_List” and
“Records” in it. Implement the
following SQL commands on the
table: -
a. Insert data
b. Alter table (add new
attribute/modify data type/ drop
attribute)
c. Update data
d. Delete record
e. Aggregate Functions
f. Order by Clause
g. Fetch data
28
h. Group By data
I. Join tables
*Create Database:
*Create Tables:
*Describe Table:
29
*Fetch Data:
30
*After Clause:
→Drop Attribute
31
→Add Attribute
→Modify Attribute
32
*Update Values:
*Delete Record:
33
*Aggregate Functions:
→MAX
→MIN
→SUM
→COUNT
→AVERAGE
34
*Order - By Clause:
Group – By Clause:
35
joining tables:
36
Connectivi
ty of SQL
37
With
Python
Program16:
Integrate SQL with Python by importing the MySQL module to
implement:
a. Create a table
b. Insert data
c. Fetch data
d. Update data
e. Delete data
38
39
40
thank
You
41