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

Assignment-Practical List XII 2022-23

Uploaded by

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

Assignment-Practical List XII 2022-23

Uploaded by

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

Jawahar Navodaya Vidyalaya, Korba (C.G.

)
Academic Session: 2022-23
Computer Science (083) - Practical Program List

Class : XII
Topic : Revision of the basics of python
1. Write a program for Fibonacci series up to 50.
2. Write a program to take a number and check whether it is an Armstrong No or not.
3. Write a program to take an input and check whether it is Palindrome or not.
4. Write a program to implement break, continue and pass jump statements.
Topic : Function
1. Write a program to implement default passing parameter concept.
2. Write a program to use math library pow() and sqrt() functions.
3. Write a program to use randint(), random() and randrange() functions.
4. Write a program to implement statics module mean(), median() and mode() functions.
Topic : Text File
1. Read a text file line by line and display each word separated by #.
2. Read a text file and display the number of vowels/consonants/uppercase/lowercase characters in the
file.
3. Remove all the lines that contain the character 'a' in a file and write it to another file.
4. Write a program to count the number of upper- case alphabets present in a text file “Article.txt”.
5. Write a program to count the words “to” and “the” present in a text file “Poem.txt”
6. Write a python program to read a file named “story.txt”, count and print total lines starting with
vowels in the file?
7. Write a python program to read a file named “article.txt”, count and print the following:
(i). length of the file (total characters in file)
(ii). total alphabets
(iii). total upper case alphabets
(iv). total lower case alphabets
(v). total digits
(vi). total spaces
(vii). total special characters
Topic : Binary File
1. 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.
2. Create a binary file with roll number, name and marks. Input a roll number and update the marks.
3. Write a program with a function disp75( ) in Python to display only those records of students from file
“school.dat” who scored more than 75 percent marks. Structure stored in “school.dat” is in the form of
list containing information like [rollno, name, class, percentage]
4. Write a menu driven program which shows all operations on Binary File
1. Add Record
2. Display All Record
3. Display Specific Record
4. Modify Record
5. Delete Record
Topic : CSV File
1. Write a program to create a csv file to store student data (Rollno, Name, Marks). Obtain data from
user and write 5 records into the file. Also read the records of this csv file and display them.
2. Write a program to read and write in a CSV file.
Topic : Data Structure: Stack
1. Write a python program to maintain book details like book code, book title and price using stacks data
structures? (Implement push(), pop() and traverse() functions).
2. Write a Python program to implement a stack using list.
Topic : SQL (Structured Query Language)
1. Write SQL commands for the following queries (i) to (v) based on the relations Teacher and Posting
given below:

i. To show all information about the teacher of History department.


ii. To list the names of female teachers who are in Mathematics department.
iii. To list the names of all teachers with their date of joining in ascending order.
iv. To display teacher’s name, salary, age for male teachers only.
v. To display name, bonus for each teacher where bonus is 10% of salary.
2. Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables.

(i) Display the Trainer Name, City & Salary in descending order of their Hiredate.
(ii) To display the TNAME and CITY of Trainer who joined the Institute in the month of
December 2001.
(iii) To display TNAME, HIREDATE, CNAME, STARTDATE from tables TRAINER and
COURSE of all those courses whose FEES is less than or equal to 10000.
(iv) To display number of Trainers from each city
(v) SELECT TID, TNAME, FROM TRAINER WHERE CITY NOT IN(‘DELHI’, ‘MUMBAI’);
(vi) SELECT DISTINCT TID FROM COURSE;
(vii) SELECT TID, COUNT(*), MIN(FEES) FROM COURSE GROUP BY TID HAVING
COUNT(*)>1;
(viii) SELECT COUNT(*), SUM(FEES) FROM COURSE WHERE STARTDATE< ‘2018-09-15’;
3. Consider the following relation MobileMaster & MobileStock:-

Write the SQL query for questions from (i) to (iv) & write the output of SQL command for questions
from (v) to (viii) given below:-
(i) Display the Mobile company, name & price in descending order of their 6 Page No. 13
manufacturing date.
(ii) List the details of mobile whose name starts with „S‟ or ends with „a‟
(iii) Display the Mobile supplier & quantity of all mobiles except „MB003‟
(iv) List showing the name of mobile company having price between 3000 & 5000
(v) SELECT M_Id, SUM(M_Qty) FROM MobileStock GROUP BY M_Id;
(vi) SELECT MAX(M_Date), MIN(M_Date) FROM MobileMaster;
(vii) SELECT M1.M_Id, M1.M_Name, M2.M_Qty, M2.M_Supplier FROM MobileMaster M1,
MobileStock M2 WHERE M1.M_Id=M2.M_Id AND M2.M_Qty>=300;
(viii) SELECT AVG(M_Price) FROM MobileMaster;
Topic : Interface python with SQL database
1. Write a program to establish a connection with mySQL and create a table at run time.
2. Write a program to establish a connection with mySQL and change table structure/ (add, edit, remove
column of a table) at run time.
3. Write a program to establish a connection with mySQL and insert a record in a table at run time.
4. Write a program to establish a connection with mySQL and search a particular record at run time.
Write a program to establish a connection with mySQL and implement featchall(), featchone(),
fetchmany() and rowcount() functions.
5. Write a program to establish a connection with mySQL and update a record in a table at run time.
Note: - Complete all above practical’s till after finishing the topics concerned and submit to check regularly. Make
practical file as guided with hand written manner no printouts and allowed.

Kamlesh Kumar
PGT- Computer Science
JNV, Korba (C.G.)

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