Kaynağa Gözat

Добавить 'practical-2/4.2.py'

u25-29kolmykov 4 gün önce
ebeveyn
işleme
0d48e0800e
1 değiştirilmiş dosya ile 10 ekleme ve 0 silme
  1. 10 0
      practical-2/4.2.py

+ 10 - 0
practical-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)