First 5
First 5
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
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.
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:"))
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