0% found this document useful (0 votes)
3 views21 pages

Practical File-Am. (2)

This document is a practical file for a student named Kanan Gandhi, detailing assignments in Python and SQL for the subject of Informative Practices. It includes an index of Python programs covering various calculations and data manipulations, as well as SQL queries for different database tables. The document serves as a structured guide for programming exercises and database management tasks.

Uploaded by

Kanan Gandhi
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)
3 views21 pages

Practical File-Am. (2)

This document is a practical file for a student named Kanan Gandhi, detailing assignments in Python and SQL for the subject of Informative Practices. It includes an index of Python programs covering various calculations and data manipulations, as well as SQL queries for different database tables. The document serves as a structured guide for programming exercises and database management tasks.

Uploaded by

Kanan Gandhi
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/ 21

PRACTICAL FILE

Student Name: Kanan Gandhi


Class: 11TH B
Subject: Informative Practices
Teacher Name: Ms. Sonam Aggarwal Ma’am

INDEX FOR PYTHON


1. Sum of two numbers
2. Simple Interest
3. Average of three numbers
4. Selling price
5. Converting time from minutes into hours and minutes
into seconds
6. Calculating perimeter of triangle
7. Reverse of two digit numbers
8. Odd or even
9. Percentage and grading students
10. Number is zero, negative or positive
11. Vowel or consonant
12. Multiple of any number
13 Find factorial numbers
14. Sum of even numbers
15. Number of lines
16. Number of lines in special character
17. Calculate the mean of a given list of numbers
18. Numbers which are divisible from both lists
19. two list and display the maximum elements from the lists
20. Arrange the list of numbers in ascending order and
descending order
INDEX FOR SQL

1 BOOKS
2 FURNITURE
3 GRADUATE
4 PRODUCTS and CLIENTS
5 HOSPITAL
6 PRODUCT

1.Sum of two numbers input:-

1.Sum of two numbers output:-


2. Simple Interest Input:-

2.Simple interest output:-

3.Average of three numbers input:-

3.Average of three numbers output:-

4. Selling price input:-


4. Selling price output:-

5. Converting time from minutes into hours and minutes into seconds
Input:-

5. Converting time from minutes into hours and minutes into seconds
Output:-

6. Calculating perimeter of triangle input:-

6. Calculating perimeter of triangle output:-


7. Reverse of two digit numbers, input:-

7. Reverse of two digit numbers, output:-

8. Find a given number is odd or even, input:-

8. Find a given number is odd or even, output:-

9. Accepting percentage of a student and displaying the grades, input:-


9.Accepting percentage of a student and displaying the grades, ouput:-

10. Check either the number is zero, negative or positive, input:-

10. Check either the number is zero, negative or positive, output:-

11. Vowel or consonant, input:-

11. Vowel or consonant, output:-


12. Multiple of any number, input:-

12. Multiple of any number, output:-

13. Find factorial numbers, input:-

13. Find factorial numbers, output:-

14. Sum of even numbers, input:-


14. Sum of even numbers, output:-

15. Number of lines, input:-

15. Number of lines, output:-

16. Number of lines in special character, input:-

16. Number of lines in special character, output:-


17. Calculate the mean of a given list of numbers, input:-

17. Calculate the mean of a given list of numbers, output:-

18. Write a program to input a list and to input two numbers and then
create a list from those numbers which are divisible from both
numbers, input:-

18. Write a program to input a list and to input two numbers and then
create a list from those numbers which are divisible from both
numbers, output:-

19. Write a program to input two list and display the maximum
elements from the lists along with its index, input:-
19. Write a program to input two list and display the maximum
elements from the lists along with its index, output:-

20. Write a program to arrange the list of numbers in ascending order


and descending order, intput:-

20. Write a program to arrange the list of numbers in ascending order


and descending order, output:-
SQL

1. Write the following queries for the table books:


Table name- BOOKS

i)To show the books of FIRST PUBL. written by J. Mukhi.

ii)To display cost of all the books published for FIRST PUBL.

iii)To display the Book_Name and price of the books more than 3 copies of which have been issued.
iv)To show the details of the book with quantity more than 30.

2. Write SQL commands for the following table.


Table name FURNITURE

a)To list the details of furniture whose price is more than 10000.

b)To list the item name and price of furniture whose discount is
between 10 and 20.
c)To delete the record of all items where discount is 30.

d)To display the price of ‘Babycot’.

e) Select distinct type from furniture;


3.Table name- Graduate

i)List the names of those students who have obtained rank=1.

ii) Display a list of all those names whose average is greater than 65.

iii)Display the names of those students who have opted computer as


a subject with average of more than 60.
iv)List the name of all students.

v)Select *from GRADUATE where Subject=’Physics’;

vi)Select Rank1 from Graduate;


4.
Table names- PRODUCTS and CLIENTS
i. Write SQL query to display ProductName and Price for all
products whose Price is in the range 50 to 150.

ii. Write SQL Query to display details of products whose


maufracturer is either XYZ or ABC.

iii. Write SQL Query to display ProductName, Manufacturer and


Price for all products that are not given any discount.

iv. Write SQL query to display ProductName and price for all
products.
v. Which column is used as Foreign key and name the table where
it has been used as Foreign Key?
Ans v.
The column which is used as Foreign key is ‘P_ID’, It has been used in
both the tables- Product & Client. It is used to connect the two tables.
4. Table name- HOSPITAL

i)To list the names of all patients admitted after 15/01/98.

ii)To list the names of female patients who are in ENT department.
iii)To list the names of all patients with their date of admission.

iv)To display Patient’s Name, Charges and Age for only female patients.
6. Table name- Product

i)To show details of all PCs with stock more than 110.

ii)To list the company which gives warranty of more than 2 years.

iii)To find stock value of BPL company where stock value is sum of the
products of price and stock.
iv)To show products from PRODUCTS table.

v)To show the product name of the products which are within
warranty as on date.

You might also like