Code: Select all
#
# in general, false should be considered a BOOLEAN value, not a STRING. I suggest:
# game = False
#
game = "false"
start = input("Do you want to start game? answer y or n --> ")
if start == "n":
print ("Goodbye.")
else:
game = True
players = {}
print ("the current players are" + str(players))
#ask for amt of players, create dict of players
#
# Why use a dictionary here? I am curious. There isn't a right or wrong answer, but a justification.
#
amount_of_players = input("How many players would you like? (1-4)")
while len(players) < int(amount_of_players):
new_player_name = ("player" + str(len(players)+1))
players[new_player_name] = 0
#printing the scores
print ("here are the current scores:")
for key,val in players.items():
print (key, "=>", str(val))
#asking for amount of rounds
turns = input("how many questions would you like each player to answer? -->")
amount_of_questions = int(turns) * int(amount_of_players)
print ("Okay. You will play the game for " + str(turns) + " rounds. This means that the game will generate " + str(amount_of_questions) + " questions in total.")