def f1(x):
return x**2 + 15*x
def f2(x):
return x - 25
def f3(x):
return (x+3)/10
x = int(input())
if x <= 5: print(f1(x))
elif 5<x<=8: print(f2(x))
else: print(f3(x))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
def f1(x):
return x**2 + 15*x
def f2(x):
return x - 25
def f3(x):
return (x+3)/10
x = int(input())
if x <= 5: print(f1(x))
elif 5<x<=8: print(f2(x))
else: print(f3(x))