fork download
  1. # A simple program to calculate the sum of numbers from 1 to 10
  2.  
  3. total = 0
  4. for number in range(1, 11): # The range starts at 1 and ends at 10
  5. total += number
  6.  
  7. print("The sum is:", total)
  8.  
Success #stdin #stdout 0.03s 9604KB
stdin
Standard input is empty
stdout
The sum is: 55