0% found this document useful (0 votes)
16 views3 pages

12cs Practical2024

Uploaded by

girlscreative913
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)
16 views3 pages

12cs Practical2024

Uploaded by

girlscreative913
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/ 3

Welfare Mission International School

Computer science practical list ( XIIth)


Session: 2024-25
Sr.No Practical Date Signature

Python programs

1 Write a Program to enter two numbers and print the arithmetic operations like
+,-,*,/, // and %. Using functions.
2 Write a program to find whether an inputted number is perfect or not.

3 Write python program to calculate factorial of a given number using function

4 Write a program to simulate a dice using random function.

5 Write a program to print appropriate weeks from entered number and display
error(exception handling)
def weeks_compute(days):
6 Write a program to read and display file content (myfile.txt)line by line with
each word separated by “#”
Note:Myfile.txt content is given below:
India has a unique culture and is one of the oldest and greatest civilizations
of the world. India has achieved all-round socio-economic progress since its
Independence
7 Program to read the content of file and display the total number of consonants,
uppercase, vowels and lower case characters.
Note:Demo.txt content is given below:
A microcomputer is a small computer built around
a microprocessor integrated circuit
8 Write a program to create a binary file to store “Rollno” and “Name”,search any
Rollno and display name if roll no found otherwise print message “record is not
found”.
9 Write a program to create a binary file”student.dat” to store “Rollno”, “Name”
and “Marks”.it should update marks of entered “Rollno”.

10 Write a program to know the cursor position on a text file and print the text
according to the given specifications:
a)print the initial position
b)move the cursor to 4th position
c)display the next 5 character
d)move cursor to next 10 characters
e)print the current cursor position
f)print the next 10 characters from current position
Note:Demo2.txt file content is given below:
Artificial intelligence is the simulation of human intelligence processes by
machines, especially computer systems. Examples of AI applications include
expert systems, natural language processing (NLP), speech recognition and
machine vision.
11 Create a binary file client.dat to hold records like client_Id,Client_ name and
address using dictionary.write functions to write data,read them and print the
screen.
12 Write a program to write data into a binary file marks.dat and display the records
of students who scored more than 95 marks.

13 Write a program to read a csv file Top.csv and print the contents with tab
delimiter.ignore first row header to print in tabular form.the data for Top.csv are
as following:
Top.csv
Sr.No Batsman Team Runs Highest
1 K L Rahul KXI 670 132*
2 S Dhawan DC 618 106*
3 Dawid SRH 548 85*
Warner
4 Shreyash DC 519 88*
iyer
5 Ishan kishan MI 516 99
14 Write a menu –driven python program to impement stack operation.

15 Write a program to implement a stack for employee details(empno,name)

Sql queries

16 Create table customers as per following table instance chart.


Use database:myschool
Column Cust_id Cust_name Cust_Address Pin code Cust_phone
name
Data number varchar varchar number number
type
Length 7 30 20 8 10
17 Create table Department as per following table instance chart.
Use database:employee
Department
Column name DeptId Deptname
Key type primary
Null/unique Not null
Data type number varchar
length 4 20
18 In a database,there are two tables given below :
EMPLOYEE
Employeeid name sales Jobid
E1 Sumit sinha 1100000 102
E2 Vijay singh 1300000 101
tomar
E3 Ajay rajpal 1100000 103
E4 Mohit 1100000 102
ramnani
E5 Shailja singh 1100000 103
JOB
JOBID IOBTITLE SALARY
101 PRESIDENT 200000
102 VICE PRESIDENT 125000
103 ADMISTRATION 80000
ASSISTANT
104 ACCOUNTING MANAGER 70000
105 ACCOUNTANT 65000
106 SALES MANAGER 80000
Write SQL Queries for the following:
i)to display employee ids,names of employees,job ids with corresponding job titles.
ii) To display employee ids,names of employees,job ids with corresponding job
titles,who have achieved sales more than 1300000.
iii)To display names and corresponding job titles of those employees who
have”SINGH”(anywhere)in their names.
iv)identify foreign key in the table.
v)Write SQL command to change the “jobid” TO 104 of the employee with ID as E4 in
the table “EMPLOYEE”.

You might also like