Ver Fonte

Добавить 'Практическая 2/4.2.py'

u25-29ibragimov há 5 dias atrás
pai
commit
ba24cc3481
1 ficheiros alterados com 10 adições e 0 exclusões
  1. 10 0
      Практическая 2/4.2.py

+ 10 - 0
Практическая 2/4.2.py

@@ -0,0 +1,10 @@
+from math import sin
+
+x = float(input("Введите x: "))
+
+if x > 0:
+    y = sin(x)**2
+else:
+    y = 1 - 2 * sin(x)**2
+
+print("y =", y)