You are on page 1of 1

#How to find principal

P=float(input('Enter the principal:'))


R=float(input('Enter the rate of interest per annum:'))
T=float(input('Enter the time in years:'))
SI=(P*R*T)/100
amount=SI+P
print('Total amount paid:',amount)

# celsius to fahrnheit

celsius = int(input("Enter the Temperature in Celsius :\n"))


fahrenheit = (1.8 * celsius) + 32
print("Temperature in Fahrenheit :", fahrenheit)
celsius = int(input("Enter the Temperature in Celsius :\n"))
fahrenheit = (1.8 * celsius) + 32
print("Temperature in Fahrenheit :", fahrenheit)
celsius = int(input("Enter the Temperature in Celsius :\n"))
fahrenheit = (1.8 * celsius) + 32
print("Temperature in Fahrenheit :", fahrenheit)

# average numbers

num_1=float(input("Enter the first number"))


num_2=float(input("Enter the second number"))
num_3=float(input("Enter the third number"))
avg=(num_1+num_2+num_3)/3
print("The average of three entered numbers is",avg)

#arithmetic operations

num_1=int(input("Enter the first number:"))


num_2=int(input("Enter the second number:"))
print("The sum of",num_1,"and",num_2,"gives"num_1+num_2)
print("The difference of"num_1,"and",num_2,"gives"num_1-num_2)
print("The product of"num_1,"and",num_2,"gives"num_1*num_2)
print("The division of"num_1,"and",num_2,"gives"num_1/num_2)
print("The modules of"num_1,"and",num_2,"gives"num_1%num_2)
print("The floor division of"num_1,"and",num_2,"gives"num_1//num_2)
print(num_1,"raised to",num_2,"gives",num_1**num_2)

#area and perimeter of circle

float(input("Enter the radius: "))


print("1.Area of circle")
print("2.Perimeter of circle")
op=int(input("Choose your option: "))
if op==1:
a=3.14*r*r
print("Area of the circle with radius",r,"is",a)
elif op==2:
p=2*3.14*r
print("perimeter of the circle with radius,"r,'is',p)
else:
print("Wrong option")

You might also like