Browse Source

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

u25-29kolmykov 1 tuần trước cách đây
mục cha
commit
5a41d0aefb
1 tập tin đã thay đổi với 10 bổ sung và 0 xóa
  1. 10 0
      practical-2/4.2(a).py

+ 10 - 0
practical-2/4.2(a).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)