#WSQ07, sum of numbers

#WSQ07
in this program i use a while to make the sum of number in a range, need to make a counter, the counter helpme to do that the program finished whit counter get some value.
here is the link: https://github.com/juanheuforico/mastery/blob/master/sumof.py
here is

print(“give me  a range of integers to prints the sum of the numbers in that range “)
r1=int(input(“value to star “))
r2=int(input(“value to finish “))
cont= r1
acum=r1
while cont<r2:
    cont=cont+1
    acum=acum+1
    r1=r1+acum
    print(r1)

#WSQ07, sum of numbers

CC BY 4.0 #WSQ07, sum of numbers by Juan Antonio Olvera Robles is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.