Changes between Version 38 and Version 39 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 6:49:06 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v38 v39 186 186 1. If you want to loop over a set of numbers, use a `range()`. For example, `for x in range(0,5)` will make x go from 0 to 4 incrementing 1 each time it loops. The first number is where you start, and the second number is where you want to stop __minus 1__. Don't ask why. Its really nerdy. Not buying it? Fine. [https://softwareengineering.stackexchange.com/questions/110804/why-are-zero-based-arrays-the-norm Don't say I didn't warn you.] 187 187 188 The answer is [wiki:ProgrammingAnswerPotatoExercise here] . 188 The answer is [wiki:ProgrammingAnswerPotatoExercise here]. 189 190 ---- 189 191 190 192 [[[wiki:ProgrammingReserve Programming]Archive | Programming Archive]]