Hello,

I am trying to do the exercises in Michael Dawson's "Absolute Beginner"
book. In chapter four ("for Loops, Strings, and Tuples") one of the
challenges is: "Write a program that counts for the user. Let the user
enter the starting number, the ending number, and the amount by which to
count."

The code I have come up with so far is further below; basically my
problem is that I don't know how to feed the range() function with the
user-input numbers it expects.

Your help is highly appreciated!

Guba


# Counting Program
# 2007-04-18

# Welcoming the player
print "Hello, let me do some counting for you!"

# Telling the player what to do & assigning that info to variables.
start_num = int(raw_input("Please give me a starting number. "))
end_num = int(raw_input("Please give me an ending number. "))
interval = int(raw_input("By which amount am I to count? "))

start_num == 0
end_num == 1
interval == 2

print "Counting:"
for i in range(0, 1, 2):
    print i


raw_input("\n\nHit Enter to exit.")





        
                
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to