0% found this document useful (0 votes)
5 views2 pages

Ip Python Programs List

The document is a list of Python programming exercises categorized into three sections: basic programs, if-elif-else statements, and loops. Each section contains various tasks such as inputting numbers, performing calculations, and implementing control flow statements. The exercises aim to help learners practice and enhance their Python programming skills.

Uploaded by

bsorenthembrom
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)
5 views2 pages

Ip Python Programs List

The document is a list of Python programming exercises categorized into three sections: basic programs, if-elif-else statements, and loops. Each section contains various tasks such as inputting numbers, performing calculations, and implementing control flow statements. The exercises aim to help learners practice and enhance their Python programming skills.

Uploaded by

bsorenthembrom
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

PYTHON PROGRAMS LIST

1. Write a python program to input a welcome message and print it.


2. Write a program that displays a joke. But display the punchline only when the user presses
enter key. (Hint: You must use input ())
3. Write a python program to input two numbers and perform addition, Subtraction,
Multiplication, division.
4. Write a python program to obtain Three numbers and print their sum and average.
5. Write a program to read today's date (only day part) from user. Then display how many
days are left in the current month.
6. Write a python program to obtain Length and breadth of a rectangle and calculate its area
and perimeter.
7. Write a Python program that accepts radius of a circle and prints its area and perimeter.
8. Write a program to read a number and print its first five multiples.
9. Write a program to read a number n and print n, n², n³, n4 and n5
10. Write Python program that accepts your height in centimetres and then converts your
height to feet and inches. (1 inch = 2.54 cm, 1 inch = 1/12 feet)
11. Write a python program to Input a value in kilometres Convert it into Miles (1km =
0.621371miles).
12. Write a python program input two numbers and swap them.
13. Write a python program input three numbers and swap them.
14. Write a program that accepts loan amount, rate of interest and time and prints simple
interest.
15. Write a program to input the cost price, selling price and print the profit earned.

If-elif-else
1. Write a program to read 2 numbers and find the maximum number.
2. Write a program to read 2 numbers and find the minimum number.
3. Write a program to read the age of a person and find whether he is eligible to vote.
4. Write a program to read the student marks and find whether he is PASS or not.
5. Write a program to read 3 angles and determine If they form a triangle or not.
6. Write a program to input the cost price, selling price and print whether he/she got profit
or loss.
7. Write a program to read a number and find whether it is even or odd.
8. Write a program to read a number and find whether it is divisible by 7 or not.
9. Write a program to read 2 numbers and find whether first number it is divisible second
number or not.
10. Write a program to display a menu for calculating area of a circle or perimeter of a circle.
11. Write a program that reads two numbers and an arithmetic operator and display the
computed result.
12. Write a program to read a digit and print it in words.
13. Write a program to read 3 numbers and find the maximum/minimum number.
14. Write a Python Program to print a given character is an upper case or a lowercase or a
digit or any other character.
15. Write a program to check if the year entered by the user is a leap year or not.
16. Write a programme 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

Loops
1. Write a program to print first n numbers in ascending order.
2. Write a program to print first n numbers in descending order.
3. Write a program to print multiplication table of a number, say 5.
4. Write a program to print sum of Natural numbers between 1 to 10. Print the sum
Progressively.
5. Write a program to print sum of Natural numbers between 1 to 10.
6. Write a program to find the sum of first n natural numbers.
7. Write a program to find the sum of squares of first n natural numbers.
8. Write a program to find the sum of first n odd/even numbers.
9. Write a program to find the devisors of a number.
10. Write a program to find the first N multiples of given number
11. Write a program to input to integers x and n, compute xn using loop.
12. Write a Python Program to calculate the factorial of a given number.
13. Write a Python Program to read a number and find sum of its digits.
14. Write a Python Program to input a number and test if it is a prime number.
15. Write a Python Program to read a number and check the number is palindrome or not.

You might also like