1. Write Python program to find sum of two numbers.
a=int(input(" Enter first number : "))
b=int(input(" Enter second number : "))
s=a+b
print(" Sum of two numbers is ",s)
2. Write Python program to find average of two numbers.
a=int(input(" Enter first number :"))
b=int(input(" Enter second number : "))
s=(a+b)/2
print(" Average of two numbers is",s)
3. Write Python program to find simple interest.
p=float(input(" Enter principal :"))
t=float(input(" Enter time :"))
r=float(input(" Enter rate :"))
si=(p*t*r)/100
print(" Simple Interst is",si)
Python program to display the greater number among two numbers.
a=int(input("Enter first number: "))
b=int(input("Enter second number: "))
if a>b:
print(a,"is greater")
else:
print(b,"is greater")
Python program to display the smaller number among two numbers.
a=int(input("Enter first number: "))
b=int(input("Enter second number: "))
if a<b:
print(a,"is smaller")
else:
print(b,"is smaller")
Python program to display the greatest number among three numbers.
a=int(input("Enter first number: "))
b=int(input("Enter second number: "))
c=int(input("Enter third number: "))
if a>b and a>c:
print(a,"is greatest")
elif b>a and b>c:
print(b,"is greatest")
else:
print(c,"is greatest")