osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sum of few numbers by using for and range


Hello!

I need to do what I wrote in the subject but... I don't understand how 
could I fix my code... :\

number1 = int( input("Insert the first number:"))
number2 = int( input("Insert the second number:"))
number3 = int( input("Insert the third number:"))

print("Total amount is:")

for x in range(number1,number3):
     y = x+x
     print(y)

Regards.
^Bart