x = int(input('x = ')
if x < 0:
y = 17 * x ** 2 - 3 * x
elif 0 <= x <= 5:
y = 2 * x + 5
else:
y = 25 * x
print('y =', y)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
x = int(input('x = ')
if x < 0:
y = 17 * x ** 2 - 3 * x
elif 0 <= x <= 5:
y = 2 * x + 5
else:
y = 25 * x
print('y =', y)