We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8772e6d commit 119ca53Copy full SHA for 119ca53
Printing First n natural numbers.py Sum of First "n" Natural numbers.py
@@ -1,3 +1,5 @@
1
n = int(input("Input n : "))
2
+sum = 0
3
for i in range(n):
- print(i+1)
4
+ sum = sum + (i+1)
5
+print(sum)
0 commit comments