May-26-2018, 01:21 PM
You need to store the answers from the user in a structure of data (so store somehow your enter_for_category in a data structure)
To put it clear, you can solve your exercise with the following:
To put it clear, you can solve your exercise with the following:
for i in range(3): category = input("Enter a Category: ") # The next lines are a cry to suspend... a = input("Enter Something in that category: ") b = input("Enter Something in that category: ") c = input("Enter Something in that category: ") # Report the results: print(f"{category}: {a} {b} {c}")So you see what you shall change... you need to replace the "a, b, c" with a data structure that allows you to fill it with a loop. Take a look to the dict and list in the python documentation.