Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

#Write a program to find a person is eligible for Indian Driving license.

#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")

Enter Your Age56


#Write a program to find a given number is odd or even. #The same concept for
any number divisibility test a=int(input("Enter any number")) if #% operator will
give remainder after division print ("Even Number") else:
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:

print ( " Excellent " )


el if avg>=70: print ("V
Good") el if avg>=50:
print( "Good" ) else:

enter your Math marks34


enter your English marks56
enter your Science marks78
Good

#Write a program to convert Indian rupees to Dirhams

rs=int(input("Enter amount")) dhs=rs/22 print(dhs)

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"))

area=l*b perimeter=2*(1+b) print (area) print (perimeter)

#Write a program to find the smallest of 2 numbers.


a=int(input("Enter first number")) b=int(input("Enter
Second")) if a>b:
print (a, "is greater than", b)

else:
print (b, "is greater than", a)

#Write a program to find the TSA of a


cylinder. r=int(input("Enter radius"))
h=int(input("Enter height"))
tsa=2*3.14*r(r+h) print(tsa)

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")

You might also like