Sun Nov 06 2022 03:17:12 GMT+0000 (Coordinated Universal Time)
Saved by @codewithakash
n = int(input("enter a number: ")) i = 1 sum = 0 while (i <= n): sum = sum + i i = i + 1 print("The sum is: ", sum)
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments