|
META TOPICPARENT |
name="Solutions" |
Solutions to Exercise 1: REPL and standard Python programming
Exercise 1: Use of REPL
The screen shot shows the REPL session |
|
< < | |
> > | |
| Exercise 2: A simple calculator
In the first example we use fixed values for the calculations. To print out the results I first use integer (%d) format and then floating point format (%f) to get the division right. |
|
META FILEATTACHMENT |
attachment="geoHarm.png" attr="" comment="" date="1588683360" name="geoHarm.png" path="geoHarm.png" size="29460" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="factFibonacci.png" attr="" comment="" date="1588683360" name="factFibonacci.png" path="factFibonacci.png" size="28907" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="approx.png" attr="" comment="" date="1588683360" name="approx.png" path="approx.png" size="48799" user="UliRaich" version="1" |
|
|
< < |
META FILEATTACHMENT |
attachment="repl.png" attr="" comment="" date="1588683360" name="repl.png" path="repl.png" size="41102" user="UliRaich" version="1" |
|
|
META FILEATTACHMENT |
attachment="assigments.py.txt" attr="" comment="" date="1588683778" name="assigments.py.txt" path="assigments.py.txt" size="438" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="calculator.py.txt" attr="" comment="" date="1588683778" name="calculator.py.txt" path="calculator.py.txt" size="1650" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="calculatorV1.py.txt" attr="" comment="" date="1588684838" name="calculatorV1.py.txt" path="calculatorV1.py.txt" size="3255" user="UliRaich" version="2" |
|
|
META FILEATTACHMENT |
attachment="conditionsV3.py.txt" attr="" comment="" date="1588701596" name="conditionsV3.py.txt" path="conditionsV3.py.txt" size="1507" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="fibonacciV2.py.txt" attr="" comment="" date="1588702187" name="fibonacciV2.py.txt" path="fibonacciV2.py.txt" size="799" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="fibonacciV1.py.txt" attr="" comment="" date="1588702187" name="fibonacciV1.py.txt" path="fibonacciV1.py.txt" size="1079" user="UliRaich" version="1" |
|
|
> > |
META FILEATTACHMENT |
attachment="repl-1.png" attr="" comment="" date="1590660690" name="repl-1.png" path="repl-1.png" size="47351" user="UliRaich" version="1" |
|