Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Question no. 21")
- quest=str(input("Enter the question number"))
- if quest=="a":
- b=int(input("Enter the value of b"))
- h=int(input("Enter the value of h"))
- print(1/3*(b**2*h))
- elif quest=="b":
- r=int(input("Enter the value of r"))
- h=int(input("Enter the value of h"))
- print(22/7*r**2*h)
- elif quest=="c":
- r=int(input("Enter the value of r "))
- h=int(input("Enter the value of h"))
- print(1/3*22/7*r**2*h)
- elif quest=="d":
- x1=int(input("Enter the value of x1"))
- x2 = int(input("Enter the value of x2"))
- y1=int(input("Enter the value of y1"))
- y2= int(input("Enter the value of y2"))
- print(((x2-x1)**2+(y2-y1)**2)**1/2)
- elif quest=="e":
- x=int(input("Enter the value of x"))
- h=int(input("Enter the value of h"))
- y=int(input("Enter the value of y"))
- k=int(input("Enter the value of k"))
- r=((x-h)**2+(y-k)**2)**1/2
- print(r)
- elif quest=="f":
- b=int(input("Enter the value of b"))
- a=int(input("Enter the value of a"))
- c=int(input("Enter the value of c"))
- x=(-b+(b**2-4*a*c)**1/2)/2*a
- print(x)
- elif quest=="g":
- a=int(input("Enter the value a"))
- n=int(input("Enter the value of n"))
- m=int(input("Enter the value of m"))
- d=m+n
- print(a**(d))
- elif quest=="h":
- a=int(input("Enter the value of a"))
- n=int(input("Enter the value of n"))
- m=int(input("Enter the value of m"))
- d=m*n
- print(a**d)
- elif quest=="i":
- a = int(input("Enter the value of a"))
- m = int(input("Enter the value of m"))
- n = int(input("Enter the value of n"))
- if m>n:
- print(a**(m-n))
- elif n>m:
- print(a**(n-m))
- elif quest=="j":
- a=int(input("Enter the value of a"))
- n=int(input("Enter the value of n"))
- d=1/a**n
- else :
- exit("Wrong values were input")
Add Comment
Please, Sign In to add comment