Created
May 9, 2022 18:41
-
-
Save Nehadsys/6b374fad37be95a4997ffbf69e6c05cb to your computer and use it in GitHub Desktop.
Arcade Game with token machine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#The token is provided by the player as an input | |
token = eval(input("Enter Your Token Please: ")) # Evaluating the incoming value to its respective Data type | |
print(f"Tokens: {token}\n") | |
trackToken = token #assigning the tracking variable of token | |
counter = 0 #starting value --> 0 | |
#using whileloop | |
while counter < token: | |
trackToken = trackToken - 1 #subtracting the Token by 1 figure | |
print(f"| Playing, Chances Left: {trackToken} |") | |
counter = counter + 1 #increasing by 1 | |
#print statements for better reading | |
print("-----------------------------") | |
print("Game has finished, Buy more tokens to continue playing :)") | |
print("-----------------------------") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment