Funktionalität: Grundlogik mit userinput als Platzhalter

This commit is contained in:
Franziska Gerold 2025-12-16 20:51:05 +01:00
parent 8e53a45b56
commit 3d27dac239

View File

@ -1,24 +1,49 @@
import random
def score(x):
return score
pass
def command_tilt():
pass
action = input()
if action == "0":
return 1
else:
return -1
def command_blind():
pass
action = input()
if action == "0":
return 1
else:
return -1
def command_scream():
pass
action = input()
if action == "0":
return 1
else:
return -1
def command_spin():
pass
action = input()
if action == "0":
return 1
else:
return -1
def main():
score = 0
result = 0
print("Let's play a Round of 'Raspberry says'!")
list_command_choices = [command_tilt, command_blind, command_scream, command_spin]
print(random.choices(list_command_choices))
list_command_choices = [command_tilt, command_blind, command_scream, command_spin]
while result != -1:
score += result # war zuerst zwei Zeilen weiter unten, hat dann aber nach einer falschen Runde den Score erhöht
round = random.choice(list_command_choices)
result = round()
print(f"Game over! Your Score is {score}")
main()