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

Class XII Practical Record

This document contains 20 programming tasks related to Python database connectivity and SQL queries. Some of the tasks involve creating tables in a database, inserting data, modifying data, deleting records, and writing SQL queries to retrieve and manipulate data.

Uploaded by

Vedant Singh
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)
72 views3 pages

Class XII Practical Record

This document contains 20 programming tasks related to Python database connectivity and SQL queries. Some of the tasks involve creating tables in a database, inserting data, modifying data, deleting records, and writing SQL queries to retrieve and manipulate data.

Uploaded by

Vedant Singh
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

Class XII Practical Record

1. Write a program that multiplies two integer numbers without using the * operator, using
repeated addition.
2. Write a program that repeatedly asks from users some members until string ‘done’ is typed. The
program should print the sum of all numbers entered.
3. Write a program that reads a line and prints its statistics like:
Numbers of Uppercase letters:

Numbers of lowercase letters:

Numbers of alphabets:

Numbers of digits:

4. Write a Program that receives two numbers in a function and returns the results of all arithmetic
operations (+, -, *, /, %) on these numbers.
5. Write a program to read a text file and display the count on vowels and consonant in the file.
6. Write a program to get student data (roll no., name and marks) from user and write onto a
binary file. The program should be able to get data from the user and write onto the file as long
as user wants.
7. Write a program to a Read a file stu.dat created in earlier programs and display the records
having marks > 81.
8. Write a program to create a csv file by suppressing the EOL translation.
9. Write a program that contains a recursive function to print a string backwards.
10. Write a program to delete an element from 50amsorted linear list.
11. Write a program to implement stack operations.
65 m
12. Write a program to implement queue operations.
13. Lantastic Corporation caters to many high profile clients and has 6 buildings where it runs its
operation shown below.
185

PRO 50 m Grey 30 m Wiza


55 Cell 60
rd

35 m
45 m 65 m

120
30 m
Robo Mast
55 er
40 m
70

Number of Computers

Distance

Answer the following questions on the basis of above given information.

i. Suggest the possible cable layouts for the building


ii. Where would you suggest the placement of server?
iii. Suggest the cable type that should be used.
iv. The management wants that the network traffic should be minimized. For this which
network device would you suggest out of the following devices and why?
[a] Hub [b] Repeater [c] Bridge
14. Consider the table PET of database menagerie and write SQL Queries
i. To display the names of pet beginning with ‘F’ .
ii. To display the names of pet having exactly four letter names.
15. Write the SQL query to create a table Employee with the following structure.

Name of
ID First_Name Last_Name User_id Salary
the Column
Type Number (4) Varchar(30) Varchar(30) Varchar(10) Number(9,2)

Ensure the following specification in created table:


 ID Should be declared as Primary Key
 User_Id should be unique
 Salary must be greater than 5000
 First_Name and Last_Name must not remain blank
16. Add the following data in the above Table (Employee) as instructed.

ID First_Name Last_Name User_id Salary


1 Dim Joseph Jdim 5000
2 Jagannath Mishra Jnmishra 4000
3 Siddharth Mishra Smishra 8000
4 Shankar Giri Sgiri 7000
5 Gautam Buddha Bgautam 2000

i. Populate table with first record mentoring the column list in the insert clause.
ii. Populate table with next two records without mentoring the column list in the insert
clause.
iii. Populate table with 4th record and enter only ID and First_name.
iv. Populate table with 5th record and enter ID, User_Id and last_name only.

17. Consider the table created in Q. 14 and Q. 15. Perform the following on the same Employee
table.
i. Modify the Last_name, of the employee 3 to ‘Verma’
ii. Modify the Salary and increase it by 1000, for all who get salary less than 5000
iii. Delete the employee record having Fisrt_name as sidhharth.
iv. For record with ID=4 record with Last_name, User_id, and salary.

18. Write a output for SQL queries , which are based on the table : Student given below

RollNo Name Class DOB Gender City Marks


1 Nanda X 06-06-1995 M Agra 551
2 Saurabh XII 07-05-1993 M Mumbai 462
3 Sanal XI 06-05-1994 F Delhi 400
4 Trisla XII 08-08-1995 F Mumbai 450
5 Stort XII 08-10-1995 M Delhi 369
6 Marisla XI 12-12-1994 F Dubai 250
7 Neha X 08-12-1995 F Moscow 377
8 Nishant X 12-06-1995 M Moscow 489

i. To display the record of the student in alphabetic order as per the name of the students.
ii. To display the Class, DOB, and city whose marks is between 450 and 551
iii. To display Name, Class and total number of students who have secured more than 450
marks, class wise.
iv. To increase marks of all the students by 20 whose class is “XII”.

19. Write a Python database connectivity script that deletes records from category table of
database items that have name =”Stockable”
20. Write a Python program that displays first three rows fetched from student table of MySQL
database ‘test’. Use pymysql to connect with the database.
Note. User is “learner” and password is “fast”

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