0% found this document useful (0 votes)
37 views16 pages

CS Practical Assignment 17 - 22

Uploaded by

Vibhum Sharma
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)
37 views16 pages

CS Practical Assignment 17 - 22

Uploaded by

Vibhum Sharma
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/ 16

Practical Assignment : 17

Date: 31 July, 2024


Title:Write a menu-driven program for push and pop operations
for a stack containing integers.

Program Code:
Output:
Practical Assignment : 18
Date: 07 August, 2024
Title:Write a program in python to calculate the Area or
Perimeter of a rectangle depending upon the choice of user with
the help of a function FunctionArea_Perimeter() that takes two
parameters length and breadth of the rectangle and returns both
area and perimeter as a tuple.
Program Code:
Output:
Practical Assignment : 19
Date: 21 August, 2024
Title: Write a program in python to calculate the salary related
data of an employee and display.
Input:
Name
Basic Salary of employee
Job Code of employee (Any one out of 101, 102 or 103)
Calculate:
Calculate da, hra and tax accordion to following table as the
percentage of the basic salary.

Job Code--> 101 102 103

da 50% of basic 45% of basic 40% of basic

hra 35% of basic 30% of basic 25% of basic

tax 20% of basic 15% of basic 10% of basic

Calculate-
Gross Salary=Basic Salary + da+hra
Net Salary=Gross Salary-Tax
Note: Create Functions for the calculation of da, hra and
tax.
Program Code:
Output:
Practical Assignment : 20
Date: 09 October, 2024
Title: Write a program in python to create a binary file
product.dat (product_id, product_name, Stock_status (Y/N))
that contains the data of the various products and its availability.
Sort this file in the ascending order of product_name.
Program code:
Output:
PRACTICAL ASSIGNMENT-21
DATE:- 23 October, 2024
Q)

1) Create a table
product1(pid,name,price)

2) After it’s creation set pid as primary key

3) Remove pid as a primary key


4) Create a table stock with following
column details:

 item_no , int , primary key


 pname , varchar(10) , NOT NULL
 part_no , int , unique
 category , varchar(12),
default(technology)

TABLES:-
PRODUCT1:

STOCK:
Practical assignment 22
Date – 06 November, 2024
Question.Create a table student with the following.

Display rollno,name of students who admitted in the month


of june

Display name and their corresponding day of week for those


before year of birth 2006
Display name and monthname for both dob and doa

Display day of week for dob in three letter format

You might also like