1/10
Looks like no tags are added yet.
arguments
An argument is the actual value you give to a function when you call it.
Parameters
placeholders for values while arguments are the actual values passed to the function
where do i look to find arguements?
Look at the procedure call to find the arguments, not the procedure definition.
What does list[x] mean?
Gets the item at position x in a list. Python starts counting at 0.
What does total = total + 1 do?
Increases total by 1. Used for counting.
What does total = total + list[x] do?
Adds the current list item to total. Used for finding a sum.
What does == mean?
Checks whether two values are equal.
What does % mean?
Finds the remainder after division. Example: |
How do you prevent an infinite while loop?
Update the variable controlling the loop, such as x = x + 1, so the condition can become false.
What does return do?
Sends a value back to where the function was called and ends the function.
What's the difference between print and return?
|