python programming II _221214_095049
python programming II _221214_095049
a=int(input('enter I number'))
b=int(input ('enter II number'))
c=int(input ('enter III number'))
if(a>b)and(a>c):
print('the greatest number is',a)
elif(b>a)and(b>c):
print('the greatest number is',b)
elif(c>a)and(c>b):
print('the greatest number is',c)
else:
print('all the 3nos.are equal')
10)WAP to check eligibility to vote
age=int(input('enter your age'))
if age>=18:
print ('you are an adult and you can go for voting')
else:
print ('sorry! you are not an adult and ineligible for
voting')
11)WAP to check whether given no. is even or odd
a=int(input('enter I number'))
b=int(input ('enter II number'))
c=int(input ('enter III number'))
d=int(input ('enter IV number'))
if(a>b)and(a>c)and(a>d):
print('the greatest number is',a)
elif(b>a)and(b>c)and(b>d):
print('the greatest number is',b)
elif(c>a)and(c>b)and(c>d):
print('the greatest number is',c)
elif(d>a)and(d>b)and(d>c):
print('the greatest number is',d)
else:
print('all the 4nos.are equal')
17.Enter 2 numbers and check whether first number is
divisible by second number.
a=int(input('enter I number'))
b=int(input ('enter II number'))
if(a%b==0):
print(a,"is divisible by",b)
else:
print(a,"is not divisible by",b)
18.To calculate restaurant bill on choice of item.(1. Pizza 2.
Noodles 3. Burger)
choice=input("Choose the dish(1.Pizza:149Rs. 2.Noodles:49 Rs.
3.Burger:99 Rs):")
if(choice=="Pizza" or choice=="pizza"):
quantity=int(input("enter the quantity of the Pizza Purchased:"))
bill=quantity*149
print("bill amount to be paid:",bill,"Rs.")
elif(choice=="Noodles" or choice=="noodles"):
quantity=int(input("enter the quantity of the Noodles Purchased:"))
bill=quantity*49
print("bill amount to be paid:",bill,"Rs.")
elif(choice=="Burger" or choice=="burger"):
quantity=int(input("enter the quantity of the Burger Purchased:"))
bill=quantity*99
print("bill amount to be paid:",bill,"Rs.")
else:
print("dish not in menu card")
19.To display name of the day according to user choice(1.
Monday 2.Tuesday 3. Wednesday.......)
choice=int(input("Choose the Day (1.Monday. 2.Tuesday. 3.Wednesday
4.Thursday 5.Friday 6.Weekend Begins):"))
if(choice==1):
print("Monday")
elif(choice==2):
print("Tuesday")
elif(choice==3):
print("Wednesday")
elif(choice==4):
print("Thursday")
elif(choice==5):
print("Friday")
elif(choice==6):
print("Weekend Begins")
else:
print("Not a week day")
20. Check whether a character is a capital, small letter or a
number.