def defines and names a function. This statement defines the function as "someFunction" with inputs of x and y. It allows the user to input two numbers
for starts a loop. In this case it will set "x" to a number that is between 1 and 5. The x varible stores numbers one at a time.
print tell the computer that it wants to return something to the user. Print a returns a the value of a variable named "a"
FOR loops walk a sequence. Try the explanation again talking about sequences. Mark Guzdial
for sends a variable through a sequence(looping). for x in a range(1,5) is actually a sequence of (1,2,3,4). the loop takes each value or variable one at a time and executes everything under the for block
lindsay
Lindsay, that definition is getting really close, but you are forgettting one thing: what does the For loop do after "the loop takes each value or variable one at a time and executes everything under the for block" ? Does it just stop there? Brittany Selden
When it gets to the last value in the range it goes to the end of the loop and continues with the rest of the program.