Changes between Version 66 and Version 67 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 9:53:08 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v66 v67 274 274 275 275 {{{ 276 #!python 276 277 def isOver9000(power): 277 278 if power>9000: # you could also express this if-then-else statement as "return power>9000" … … 284 285 }}} 285 286 286 Now your turn... In the 'That's-a big number exercise above" make a function called inputNumber, and modify it to use a custom function rather thanthe while-not stuff. Much easier to read, no?287 Now your turn... Modify the 'That's-a big number" exercise above, adding a custom function called called inputNumber to input one number, and use it instead of repeating the while-not stuff. Much easier to read, no? 287 288 288 289 Here's the [[ThatsaBigNumberSolution|solution]]