Bläddra i källkod

Upload files to ''

Calculates the sqrt(1 + sqrt(1 + sqrt) etc...
juan.delvalle3 3 år sedan
förälder
incheckning
9ff5588c41
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5
    0
      sumsquare.py

+ 5
- 0
sumsquare.py Visa fil

@@ -0,0 +1,5 @@
1
+import math
2
+num = 1
3
+for i in range(2, 100):
4
+    num = math.sqrt(num + 1)
5
+    print(f'{i} sum square root is {num}')