diff --git a/Algo/B2/Exercises/Repetitive tutorial.md b/Algo/B2/Exercises/Repetitive tutorial.md index f6e3bf2..bb0004a 100644 --- a/Algo/B2/Exercises/Repetitive tutorial.md +++ b/Algo/B2/Exercises/Repetitive tutorial.md @@ -131,4 +131,16 @@ def my_sum(n: int) -> int: ss += si i += 1 return ss + +# OR +def my_sum(n: int) -> int: + ss = 0 + i = 1 + while i <= n: + j = 1 + while j <= o: + ss += u(j) + j += 1 + i += 1 + return ss ``` \ No newline at end of file