Anyone Can Code.
x = 99 y = -99 if (x+y) > 0: print("Positive") elif (x-y) =< 0: print("Negative") else: print(0)
maths = 69 physics = 9 chemistry = 99 total = maths + physics + chemistry if maths < 65 or physics < 55 or chem < 50 and total <= 160: print("Fail") else: print("Pass")
x = 24 y = -6 if y*4 == x: print("Easy") elif x+y >= x: print("Moderate") else: print("Tough")
x = 9 if x > 10.0 or x < 10.0: print("Float") if x > 8 and x < 10: print(x) else: print("Integer")
units = int(input("Enter the units consumed: ")) cost = 75 if 0 <= units <= 100: cost = cost + units*5 elif 100 < units <= 250: cost = cost + 500 + (units-100)*10 elif units > 250: cost = cost + 2000 + (units-250)*20 print(cost)
Score = Show Answers
This site uses cookies to improve your experience as well as for site metrics. To see more, check out our Privacy Policy
▲