Difference: REPLAndStandardPythonProgramming (7 vs. 8)

Revision 82020-05-08 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Course on Internet of Things

Exercises Session 1:

Line: 32 to 32
  If this happens:
Changed:
<
<
conversionError.png
>
>
invalidFloat.png
 
Changed:
<
<
when the user mistypes and enters something that is not an integer, can you capture the error and simply ask the user to repeat his input, until you get 2 correct integer numbers?
>
>
when the user mistypes and enters something that is not a real number, can you capture the error and simply ask the user to repeat his input, until you get 2 correct floating point numbers?
  Bonus points: Writing a parser for user input is rather easy if the numbers and operator are separated by spaces (have a look at the split method of strings). It is quite a bit more tricky if you allow entering calculations without spaces between the operands and the operator. Can you write a parser accomplishing this?
Line: 71 to 71
 Write a script that asks the user for an angle in degrees. Calculate the sine of this angle.

Exercise 6: Classes

Changed:
<
<
Write a Python class with methods calculation mathematical number series. These series should be calculated:
>
>
Write a Python class with methods calculating mathematical number series. These series should be calculated:
 
  • The Fibonacci numbers up to F(n). n is passed as parameter to the method
  • The Fibonacci numbers smaller than max. max is passed as parameter to the method
  • The prime numbers up to max
Line: 115 to 115
 
META FILEATTACHMENT attachment="e.png" attr="" comment="" date="1588596991" name="e.png" path="e.png" size="1931" user="UliRaich" version="1"
META FILEATTACHMENT attachment="wallis.png" attr="" comment="" date="1588689113" name="wallis.png" path="wallis.png" size="6212" user="UliRaich" version="1"
META FILEATTACHMENT attachment="wallis1.png" attr="" comment="" date="1588689317" name="wallis1.png" path="wallis1.png" size="15114" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="invalidFloat.png" attr="" comment="" date="1588945107" name="invalidFloat.png" path="invalidFloat.png" size="32744" 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