diff --git a/16-dead-fun.py b/16-dead-fun.py new file mode 100644 index 0000000..e69de29 diff --git a/clean_input.py b/clean_input.py index 563d8d3..5fb84bf 100644 --- a/clean_input.py +++ b/clean_input.py @@ -1 +1,19 @@ -"""clean_input""" \ No newline at end of file +"""clean_input""" + + +#message needs to be a string that is printed for user instruction. options is a list of viable inputs +def io(message: str, options: list) -> str: + while True: + try: + i = str(input(message)) + + except (ValueError, NameError): + print("Eingabe nicht gültig, bitte wiederhole deine Eingabe.") + + if i in options: + return i + break + else: + print('Noch nicht ganz richtig. Hast du deine Auswahl auch richtig geschrieben?') + + diff --git a/game.py b/game.py index 7655ca1..e834557 100644 --- a/game.py +++ b/game.py @@ -1 +1,6 @@ -"""game""" \ No newline at end of file +"""game""" +<<<<<<< HEAD +======= + +"this a test string" +>>>>>>> 24652a721a76c0cced661a371e8b624bab716262