0% found this document useful (0 votes)
7 views1 page

Grade 6 - ICT - Python Programming For Revision

The document contains a series of Python programs for basic calculations including the area of a circle, rectangle, and triangle, as well as the average of three subject marks and the calculation of simple interest. Each program prompts the user for input and displays the calculated results. The examples illustrate fundamental programming concepts such as input handling, arithmetic operations, and output display.

Uploaded by

Aarya Modi
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)
7 views1 page

Grade 6 - ICT - Python Programming For Revision

The document contains a series of Python programs for basic calculations including the area of a circle, rectangle, and triangle, as well as the average of three subject marks and the calculation of simple interest. Each program prompts the user for input and displays the calculated results. The examples illustrate fundamental programming concepts such as input handling, arithmetic operations, and output display.

Uploaded by

Aarya Modi
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

Python Programs for Revision

1. Write a python program to calculate and display area of circle


rad = int(input(“Enter radius:”))
area = 22/7 * rad * rad
print(area)

2. Write a python program to calculate and display area and perimeter of rectangle
len = int(input(“Enter length:”))
width = int(input(“Enter width:”))
area = len * width
perimeter = 2 * (len+width)
print(area)
print(perimeter)

3. Write a python program to calculate and display area of triangle


base = int(input(“Enter base:”))
height = int(input(“Enter height:”))
area = 1/2 * base * height
print(area)

4. Write a python program to take three subject marks, calculate and display the
average of three subjects
S1 = int(input(“Enter Math marks:”))
S2 = int(input(“Enter Science marks:”))
S3 = int(input(“Enter ICT marks:”))
Avg = (S1+S2+S3)/3
print(Avg)

5. Write a python program to calculate simple interest and total amount.


simple_interest = ( principal * term * period ) / 100
total_amoount = principal + simple_interest
P = int(input(“Enter Principal amount:”))
n = int(input(“Enter number of years:”))
r = int(input(“Enter rate of interest:”))
Si = (p * n * r)/100
print(Si)
TA = p + Si
print(TA)

You might also like