Professional Documents
Culture Documents
Document (19) copy
Document (19) copy
#Using same logic you can do Eligibility for voting admission and such kind of questions
age=int(input("Enter Your Age")) if age>=60:
print ("Age is retiremnet age! Take Rest") else:
print ("You are a not eligible for retirement")
#Write a program to accept 3 subject marks and find the average and based on that
display math=float(input("enter your Math marks")) eng=float(input("enter your English
marks")) sci=float(input("enter your Science marks")) avg=(math+eng+sci)/3 if avg>=90:
2 . 5454545454545454
#Write a program to convert Celsius to Fahrenheit.
c=int(input("Enter temperature"))
mount56
#Write a program to find the area and perimeter of a rectangle.
1=int(input("Enter Length")) b=int(input("Enter breadth"))
else:
print (b, "is greater than", a)
op=input("Enter
operator") if
print(a+b) el if :
print(a-b) el if op==
print(a*b) el if / "
a=int(input("Enter number"))
b=int(input("Enter second number"))
print(a/b) el if op=="//
print(a//b)
el if op== 110%
print(a%b)
else:
print ("Invalid operator")