0% found this document useful (0 votes)
23 views

Lab Programs List

Uploaded by

dhanushgowda1979
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)
23 views

Lab Programs List

Uploaded by

dhanushgowda1979
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/ 1

LAB PROGRAMS

1. Write a program to swap two numbers using a third variable.

2. Write a program to enter two integers and perform all arithmetic operations on them.

3. Write a Python program to accept length and width of a rectangle and compute its perimeter and area.

4. Write a Python program to calculate the amount payable if money has been lent on simple interest.
Principal or money lent = P, Rate of interest = R% per annum and Time = T years. Then
Simple Interest (SI) = (P x R x T)/ 100. Amount payable = Principal + SI. P, R and T are given as input to
the program

5. Write a Python program to find largest among three numbers.

6. Write a program that takes the name and age of the user as input and displays a message whether the user
is eligible to apply for a driving license or not. (the eligible age is 18 years)

7. Write a program to find the grade of a student when grades are allocated as given in the table below.
Percentage of Marks Grade Above 90% A 80% to 90% B 70% to 80% C 60% to 70% D Below 60% E
Percentage of the marks obtained by the student is input to the program.

8. Write a function to print the table of a given number. The number has to be entered by the user.

9. Write a program to find the sum of digits of an integer number, input by the user.

10. Write a program to check whether an input number is a palindrome or not.

11. Write a program that prints minimum and maximum of five numbers entered by the user.

12. Write a program to print the following patterns:

12345
1234
123
12
1

You might also like