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

List of Practicals1

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)
18 views3 pages

List of Practicals1

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

KENDRIYA VIDYALAYA NO.

6 POKHARIPUT

Subject: Computer Science


Class : XII
Session: 2024-25

S.No Objective of the Program


.

1. WAP to show functionality of a basic calculator using


functions.
2. Write a function in python which accept a number from user
to return True, if the number is a prime number else return
False. Use this function to print all prime numbers from 1 to
100.
3. Write a function in python which accept a list of marks of
students and return the minimum mark, maximum mark
and the average marks. Use the same function to test.
4. WAP to read a text file “myfile.txt” line by line and display
each word separated by a #.
5. WAP to read a text file “myfile.txt” and display the
number of vowels/ consonants/ uppercase/ lowercase
characters in the file.
6. Remove all the lines that contain the character `a' in a file
and write it to another file.
7. Write a program to create a text file and print the lines
starting with ‘T’ or ‘P’. (Both uppercase and lowercase).
8. Read a text file to print the frequency of the word ‘He’ and
‘She’ found in the file.
9. 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.
10. Create a binary file with roll number, name and marks.
Input a roll number and update the marks.
11. Read a CSV file from hard disc and print all the details on
the screen.
12. Read a CSV file (containing item no, name, rate, qty) from
hard disc and print all the items whose rate is between Rs
500 and Rs 1000.
13. Create a CSV file by entering user-id and password, read
and search the password for given userid.
14. WAP in Python to demonstrate linear search.

15. Write a Python program to implement a stack using a list


data-structure.
16. WAP to pass an integer list as stack to a function and push
only those elements in the stack which are divisible by 7.
17. Write a program to connect Python with MySQL using
database connectivity and perform the following operations
on data in database: Fetch as per user need, update and
delete data.
Database Management
18. Create table PRODUCT & BRAND with given specifications:
PRODUCT
Col. name Data Type Constraint
Pcode String Primary key
Pname String Not null
Uprice Float
Rating Int
Bid String unique
BRAND
Col. name Data Type Constraint
Bid String Not Null
Bname String Not null
Write MySQL queries for:
1. Create both table
2. Insert some records in both table
3. Display pname and bname from both table.
4. Display the total price of each pname.
5. Count total products from each pname.
6. Display all from both table.
7. Delete those records from both table whose rating is
below 2.
8. Increase price by 5 of those item which pname is
“soap”
9. To add a new column in BRAND table quantity int.
10. To find total price for each product name.

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