Difference: SolutionsToREPLAndStandardPythonProgramming (4 vs. 5)

Revision 52020-05-28 - UliRaich

Line: 1 to 1
 
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

Changed:
<
<
repl.png
>
>
repl-1.png
 

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.

Line: 104 to 104
 
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"
Deleted:
<
<
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"
Line: 118 to 117
 
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"
Added:
>
>
META FILEATTACHMENT attachment="repl-1.png" attr="" comment="" date="1590660690" name="repl-1.png" path="repl-1.png" size="47351" user="UliRaich" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback