import sys
#Variable Initialization
a = int(raw_input("\nEnter two numbers : "))
b = int(raw_input(""))
big = a
#Processing
if b > big:
big = b
#Output
print "\nBiggest number is ",big
import sys
#Variable Initialization
a = int(raw_input("\nEnter three numbers : "))
b = int(raw_input(""))
c = int(raw_input(""))
big = a
#Processing
if b > big:
big = b
if c > big:
big = c
#Output
print "\nBiggest number is ",big
import sys
#Variable Initialization
a = int(raw_input("\nEnter three numbers : "))
b = int(raw_input(""))
c = int(raw_input(""))
#Processing
if a > b:
if a > c:
big = a
else:
big = c
else:
if b > c:
big = b
else:
big = c
#Output
print "\nBiggest number is ",big
import sys
x = float(raw_input("\nEnter value to x and n : "))
n = int(raw_input(""))
if n == 1:
y = 1 + x
else:
if n == 2:
y = 1 + x/n
else:
if n == 3:
y = 1 + pow(x,n)
else:
y = 1 + n*x
print "\nValue of y(x,n) = ",y
import sys
x = float(raw_input("\nEnter value to x and n : "))
n = int(raw_input(""))
#There is no switch statement in python
if n == 1:
y = 1 + x
else:
if n == 2:
y = 1 + x/n
else:
if n == 3:
y = 1 + pow(x,n)
else:
y = 1 + n*x
sys.stdout.write("\nValue of y(x,n) = %6.2f"%(y))
import sys
sales = int(raw_input("\nSales amount ? "))
if sales <= 500:
comm = 0.05 * sales
else:
if sales <= 2000:
comm = 35 + 0.10 * (sales - 500)
else:
if sales <= 5000:
comm = 185 + 0.12 * (sales - 2000)
else:
comm = 0.125 * sales
sys.stdout.write("\nCommission Amount Rs. %0.2f"%(comm))
import sys
import math
a = int(raw_input("\nEnter coefficients a,b and c : "))
b = int(raw_input())
c = int(raw_input())
d = b*b - 4*a*c
if d > 0:
x1 = (-b + math.sqrt(d))/(2*a)
x2 = (-b - math.sqrt(d))/(2*a)
sys.stdout.write("\nRoots are real and unequal\n %6.2f %6.2f"%(x1,x2))
else:
if d == 0:
x = -b / (2*a)
sys.stdout.write("\nRoots are real and equal \n %6.2f"%(x))
else:
sys.stdout.write("\nNo Real roots,roots are complex")
avg_marks = int(raw_input("\nAverage Marks ? "))
if avg_marks >= 80 and avg_marks <= 100:
print "\nHonours"
else:
if avg_marks >= 60 and avg_marks <= 79:
print "\nFirst Division"
else:
if avg_marks >= 50 and avg_marks <= 59:
print "\nSecond Division"
else:
if avg_marks <= 49 and avg_marks >= 0:
print "\nFail"
import sys
units = int(raw_input("\nEnter consumed units : "))
if units <= 200:
amt = 0.5 * units
else:
if units <= 400:
amt = 100 + 0.65 * (units - 200)
else:
if units <= 600:
amt = 230 + 0.8 * (units - 400)
else:
amt = 425 + 1.25 * (units - 600)
sys.stdout.write("\nAmount to be paid Rs.%0.2f"%(amt))
ts = int(raw_input("\nEnter tensile strength : "))
rh = int(raw_input("\nEnter rockwell hardness : "))
cc = int(raw_input("\nEnter carbon content : "))
if ts >= 700:
if rh >= 200:
if cc <= 6:
print "\nGrade is A"
else:
print "\nGrade is B"
else:
if cc <= 6:
print "\nGrade is C"
else:
print "\nGrade is E"
else:
if rh >= 200:
if cc <= 6:
print "\nGrade is D"
else:
print "\nGrade is E"
else:
if cc <= 6:
print "\nGrade is E"
else:
print "\nGrade is F"