fork download
  1.  
Success #stdin #stdout 0.01s 7088KB
stdin
# Initialize variables
sum_numbers = 0

# Iterate through the first 10 natural numbers
for i in range(1, 11):
    print(i)  # Print each number
    sum_numbers += i  # Add each number to the sum

# Print the total sum
print("Sum of first 10 natural numbers:", sum_numbers)
stdout
Standard output is empty