Changes between Version 25 and Version 26 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 5:32:03 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v25 v26 89 89 and run it again. What happens? It should print "Go away, we're out eating tacos". Why? If I was in Poughkeepsie, I'd be out eating tacos too. Yummmm, tacos. 90 90 91 If you're writing your own code, you want to the skip the else, just omit the word else: and the indented block belowit. For example:91 If you're writing your own code, you don't want to provide an ELSE, just omit the word else: and the indented block you want to run with it. For example: 92 92 93 93 {{{ … … 106 106 Yep, nothing was output. Nada. In this case, we used variables which were numbers, and a greater-than expression to compare them. Since the condition was ''False'', nothing was printed. 107 107 108 108 (Also note the text that starts with a # sign. The pound sign and everything after it on that line is called a ''comment'', and its a way to put some notes in the code that the program doesn't run. The team wants you to put comments in your code a lot--it makes the code easier to read and understand) 109 109 110 110 Here's a couple other control structures that you should know