Ok so me and my friend are doing a weekend challenge... Whoever makes the best game wins.
Im trying to make a game like farmville but its called mineville and its just a little different. My problem is that theres this part in the code that keeps repeating, and i can't get it to stop. What should i do? Please keep it simple as i am just a beginner. Here's the code.

scores = []
choice = None

while choice != "0":

    print(
        """
Welcome to Main Menu! Select what you would like to do!

0 - Exit
1 - Go to the Mine
2 - Go to the Shop
3 - Display Inventory
        """
        )

choice = input("Choice: ")
print(choice)

It might look familiar to some of you because i got it from my 'Python for the Absolute Beginner' book. (Don't worry, the challenge allowed the use of our programming books. Lol) Any help would be greatly appreciated! Thanks in advance.

Recommended Answers

All 3 Replies

Indent the last 2 lines to put them in the while's body.

You have only print is indented inside while.

Thanks bro!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.