Let's Build a Game


Wat could be a better approach to build this game?

Sandbox URL

(be sure to remove this if your project contains private data!)

Hey Piyush, congrats on finishing this project! Your game works really well! The only thing I can see that may make your code a little cleaner is to use a while True loop rather than setting the value of choice.

For example, your code can be modified from this…

    choice = int('0')
    while(choice != 3):
        print("Choose the next step")
        print("1:Look around")
        print("2:Clear the area")
        choice = int(input("So what's on you mind "))

…to this:

while True:
    choice = int(input('Choose the next step - 1: Look around 2: Clear the area 3: Exit'))
    if choice == 1:
        # etc...

Other than that, your game looks really good! Nicely done :slight_smile: .

1 Like

Thanks for the advice lorraine

Request = input(Are you a python developer?)
while true:
if request = yes:
print(“Please connect with me on linkedin or facebook, I would be thankful if I can get some advice”)
print(“Thanks for the help!”)

1 Like