Assignment 2
Assignment 2
Practical 1
Write a program to enter Rollno, Name , percentage and pass (enter True or
False) from the user and print the output in presentable way.
Practical 2
Write a program to enter Employee name and salary from the user, increment the
salary by 1000 and print the origin salary and modified salary of the employee
with the employee code.
Practical 3
Write a program to enter two numbers from the user, perform all arithmetic
operators on the inputted numbers and print the result in a formatted way.
Practical 4
Write a program to input length and breadth of a rectangle. Calculate and display
area and perimeter of rectangle.
Practical 5
Write a program to enter five subjects’ marks. Calculate and display the total
marks and the percentage.
Practical 6
Write a program to input principle amount, time and rate. Calculate and display
simple interest.
Practical 7
Write a program to input two numbers and swap them without the help of 3rd
variable. Print the swapped numbers. (Swapping is interchanging of values.)
Practical 8
Write a program to input salary of an employee.
Calculate the following:-
HRA is 30% of salary
DA is 50% of salary
PF is 20% of salary
TAX is 10% of salary
Net Salary = salary + HRA + DA – PF – TAX
Display the output in following format:-
SALARY HRA DA PF TAX NET SALARY ---- ---- ---- ---- ---- ----