python:dierbach:chapter_1_python_first_steps
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
python:dierbach:chapter_1_python_first_steps [2016/07/28 02:54] – mithat | python:dierbach:chapter_1_python_first_steps [2016/07/28 04:20] – [More about print()] mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~SLIDESHOW~~ | ~~SLIDESHOW~~ | ||
+ | ~~NOTOC~~ | ||
====== Python first steps ====== | ====== Python first steps ====== | ||
Line 167: | Line 168: | ||
There are 99 balloons | There are 99 balloons | ||
</ | </ | ||
- | * Each " | + | |
===== A slightly more substantial program ===== | ===== A slightly more substantial program ===== | ||
Line 279: | 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 | # Exponent Calculator | ||
# Exponent Calculator | # Exponent Calculator | ||
Line 291: | Line 292: | ||
result = base ** exponent | result = base ** exponent | ||
print(base, 'to the power of', exponent, ' | print(base, 'to the power of', exponent, ' | ||
- | </code> | + | </file> |
===== Test the solution ===== | ===== Test the solution ===== |
python/dierbach/chapter_1_python_first_steps.txt · Last modified: 2016/07/28 04:26 by mithat