0% found this document useful (0 votes)
6 views4 pages

First 5

The document contains several Python programs written by Gorijavolu Gnanasree for various tasks including calculating the area of a circle, computing simple interest, determining students' percentage from marks, finding the largest and smallest of three integers, and checking if a number is even or odd. Each program includes code snippets, example inputs, and expected outputs. The date of execution for all programs is noted as 14-08-2024.
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)
6 views4 pages

First 5

The document contains several Python programs written by Gorijavolu Gnanasree for various tasks including calculating the area of a circle, computing simple interest, determining students' percentage from marks, finding the largest and smallest of three integers, and checking if a number is even or odd. Each program includes code snippets, example inputs, and expected outputs. The date of execution for all programs is noted as 14-08-2024.
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/ 4

Write a program that accepts the radius of a circle and prints its

area.
Name: Gorijavolu Gnanasree
Class: XI-A
Date of Execution: 14-08-2024

Code:
radius=int(input(“Enter radius=”))
Area= (22*radius*radius)/7
print(“The area is=”,Area)

Output:
(Example)
Enter radius= 25
The area= 1964.2857142857142

Write a program to calculate simple interest.


Name: Gorijavolu Gnanasree
Class: XI-A
Date of Execution: 14-08-2024

Code:
principal=float(input("Enter the principal amount:"))
rate=float(input("Enter the rate of interest:"))
time=float(input("Enter the time period in years:"))
SI= (principal*rate*time)/100
print("Simple Interest=",SI)

Output:
(Example)
Enter the principal amount:1500000
Enter the rate of interest:8
Enter the time period in years:6
Simple Interest= 720000.0
Write a program that inputs students' marks and prints the
percentage of the marks.

Name: Gorijavolu Gnanasree


Class: XI-A
Date of Execution: 14-08-2024

Code:
Name=(input("Enter the name of student-"))
M1=int(input("Enter MATH marks="))
M2=int(input("Enter CHEMISTRY marks="))
M3=int(input("Enter PHYSICS marks="))
M4=int(input("Enter ENGLISH marks="))
M5=int(input("Enter BIOLOGY marks="))
Marks=M1+M2+M3+M4+M5
AverageMarks=Marks/500
Percentage=AverageMarks * 100
print("The percentage=",Percentage)

Output:
(Example)
Enter the name of student-Bhavya
Enter MATH marks=90
Enter CHEMISTRY marks=92
Enter PHYSICS marks=74
Enter ENGLISH marks=94
Enter BIOLOGY marks=87
The percentage= 87.4
Write a program to find the largest and smallest among three
integer numbers.
Name: Gorijavolu Gnanasree
Class: XI-A
Date of Execution: 14-08-2024

Code:
n1=int(input("Enter first number:"))
n2=int(input("Enter second number:"))
n3=int(input("Enter third number:"))

if (num1>num2) and (num1>num3):


print("The largest number is",num1)
elif (num2>num3) and (num2>num1):
print("The largest number is",num2)
else:
print("The largest number is",num3)

if (num1<num2) and (num1<num3):


print("tahe smallest number is",num1)
elif (num2<num1) and (num2<3):
print("The smallest number is",num2)
else:
print("The smallest number is",num3)

Output:
(Example)
Enter first number:15
Enter second number:3
Enter third number:8
The largest number is 15
The smallest number is 8
Write a program to find if a given number is even or odd.
Name: Gorijavolu Gnanasree
Class: XI-A
Date of Execution: 14-08-2024

Code:
num=int(input("Enter any number:"))
if (num%2)==0 :
print("The number is even")
else:
print("The number is odd")

Output:
(Example)
Enter any number:226496848464686841818656
The number is even

You might also like