print "Enter a number less than 10"
num=eval(raw_input()) #Inputs float variables #you can also input float variables using input()
if num<10:
print "What an obedient servant you are !\n"
print "Enter quantity and rate"
qty=eval(raw_input()) #Inputs float variables
rate=eval(raw_input())
dis=0
if qty>1000:
dis=10
tot=(qty*rate)-(qty*rate*dis/100)
print "Total expenses=Rs." ,tot
print "Enter current year and year of joining"
cy=eval(raw_input())
yoj=eval(raw_input())
yos=cy-yoj
if yos>3:
bonus=2500
print "Bonus=Rs." ,bonus
print "Enter basic salary"
bs=eval(raw_input())
if bs<1500:
hra=bs*10/100
da=bs*90/100
else:
hra=500
da=bs*98/100
gs=bs+hra+da
print "gross salary=Rs." ,gs
print "Enter either 1 or 2"
i=eval(raw_input())
if i==1:
print "You would go to heaven !\n"
else:
if i==2:
print "Hell was created with you in mind\n"
else:
print "How about mother earth !\n"
print "Enter marks in five subjects"
m1=eval(raw_input())
m2=eval(raw_input())
m3=eval(raw_input())
m4=eval(raw_input())
m5=eval(raw_input())
per=(m1+m2+m3+m4+m5)*100/500
if per>=60:
print "First division\n"
else:
if per>=50:
print "Second division\n"
else:
if per>=40:
print "Third division\n"
else:
print "Fail\n"
print "Enter marks in five subjects"
m1=eval(raw_input())
m2=eval(raw_input())
m3=eval(raw_input())
m4=eval(raw_input())
m5=eval(raw_input())
per=(m1+m2+m3+m4+m5)*100/500
if per>=60:
print "First division\n"
if per>=50 and per<60:
print "Second division\n"
if per>=40 and per<50:
print "Third division\n"
if per<40:
print "Fail\n"
print "Enter marks in five subjects"
m1=eval(raw_input())
m2=eval(raw_input())
m3=eval(raw_input())
m4=eval(raw_input())
m5=eval(raw_input())
per=(m1+m2+m3+m4+m5)*100/500
if per>=60:
print "First division\n"
elif per>=50:
print "Second division\n"
elif per>=40:
print "Third division\n"
else:
print "fail\n"
print "Enter age,sex,marital status"
age=eval(raw_input())
sex=raw_input() #Inputs string variables i,e; we can't use these variables in calculations
ms=raw_input() #Inputs string variables
if ms=='M':
print "Driver is insured\n"
else:
if sex=='M':
if age>30:
print "Driver is insured\n"
else:
print "Driver is not insured\n"
else:
if age>25:
print "Driver is insured\n"
else:
print "Driver is not insured\n"
print "Enter age,sex,marital status"
age=eval(raw_input())
sex=raw_input()
ms=raw_input()
if (ms=='M') or (ms=='U' and sex=='M' and age>30) or (ms=='U' and sex=='F' and age>25):
print "Driver is insured\n"
else:
print "Driver is not insured\n"
print "Enter Gender,Years of Service and Qualifications(0=G,1=PG):"
g=raw_input()
yos=eval(raw_input())
qual=eval(raw_input())
sal=0
if g=='m' and yos>=10 and qual==1:
sal=15000
elif (g=='m' and yos>=10 and qual==0) or (g=='m' and yos<10 and qual==1):
sal=10000
elif g=='m' and yos<10 and qual==0:
sal=7000
elif g=='f' and yos>=10 and qual==1:
sal=12000
elif g=='f' and yos>=10 and qual==0:
sal=9000
elif g=='f' and yos<10 and qual==1:
sal=10000
elif g=='f' and yos<10 and qual==0:
sal=6000
print "\nSalary of Employee=" ,sal