n = 5sum = 0for i in range(1,n+1): sum+=i print("The sum of the number",sum)
45
('The sum of the number', 15)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!