test1
This commit is contained in:
10
operators_1.py
Normal file
10
operators_1.py
Normal file
@@ -0,0 +1,10 @@
|
||||
x = float(input("Введите значение x: "))
|
||||
|
||||
if x < -1:
|
||||
f = x ** 2
|
||||
elif -1 <= x <= 1:
|
||||
f = -x
|
||||
else:
|
||||
f = x ** 3
|
||||
|
||||
print(f"{f:.2f}")
|
||||
Reference in New Issue
Block a user