Parcourir la source

Загрузить файлы 'Практическая2'

u25-29gusakov il y a 1 jour
Parent
commit
088a331c9d
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  1. 10 0
      Практическая2/4.2.ру

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

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