Initial commit
This commit is contained in:
commit
a1ddfdb7c0
14 changed files with 599 additions and 0 deletions
28
exercise_1/HAB01-A3-Template.TXT
Normal file
28
exercise_1/HAB01-A3-Template.TXT
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Gefordert: kommentiertes WHILE-Programm
|
||||
# Sie können weitere Hilfsfunktionen verwenden!
|
||||
# Namen:
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
########## HAUPTFUNKTIONEN ########## (Namen und Signatur nicht ändern!)
|
||||
# Wir nutzen Python Type hints um die Eingabe-/Ausgabetypen anzuzeigen. In WHILE/LOOP-Programmen wegen des Syntax-Checkers als Kommentar zu finden.
|
||||
|
||||
def divtwo(x): # divtwo(x: int) -> int
|
||||
# ...
|
||||
return # ...
|
||||
|
||||
|
||||
def bin(n): # bin(n: int)
|
||||
if(n <= 0):
|
||||
print(0)
|
||||
else:
|
||||
# ...
|
||||
# hier könnte divtwo(...) aufgerufen werden
|
||||
# ...
|
||||
# hier könnte print(...) aufgerufen werden
|
||||
# ...
|
||||
# Keine Ausgabe notwendig, Ausgabe findet über print statt
|
||||
return -1
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue