python:dierbach:chapter_1_python_first_steps

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
python:dierbach:chapter_1_python_first_steps [2016/07/28 02:55] mithatpython:dierbach:chapter_1_python_first_steps [2016/07/28 04:26] (current) – [Document the solution] mithat
Line 168: Line 168:
 There are 99 balloons There are 99 balloons
 </code> </code>
-* Each "thing" will be converted into a string.+  * Each "thing" will be converted into a string.
  
 ===== A slightly more substantial program ===== ===== A slightly more substantial program =====
Line 280: Line 280:
 Success. But we can do better... Success. But we can do better...
  
-Code the solution (last time!) +===== Code the solution (last time!) ===== 
------------------------------- + 
-<code python>+<file python exponent_calculator.py>
 # Exponent Calculator # Exponent Calculator
 # Exponent Calculator # Exponent Calculator
Line 292: Line 292:
 result = base ** exponent result = base ** exponent
 print(base, 'to the power of', exponent, 'is', result) print(base, 'to the power of', exponent, 'is', result)
-</code>+</file>
  
 ===== Test the solution ===== ===== Test the solution =====
Line 308: Line 308:
     * Writing out details of the problem.     * Writing out details of the problem.
     * Writing out the design of the solution.     * Writing out the design of the solution.
-    * Using comments in the source code.+    * Writing comments in the source code.
   * Do this.   * Do this.
   * **Every. Single. Time.**   * **Every. Single. Time.**
  
python/dierbach/chapter_1_python_first_steps.1469674525.txt.gz · Last modified: 2016/07/28 02:55 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki