Skip to content

Instantly share code, notes, and snippets.

View sshehrozali's full-sized avatar
🌍

Shehroz Ali sshehrozali

🌍
View GitHub Profile
@Nehadsys
Nehadsys / arcadegame.py
Created May 9, 2022 18:41
Arcade Game with token machine.
#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} |")
@sshehrozali
sshehrozali / arcadegame.py
Created May 9, 2022 16:33
Arcade Machine that takes Token and runs the game
# Question?
# What we need to build?
# 2 tokens -> Play game 2x
# 5 tokens -> Play game 5x
# 6 tokens -> PLay game 6x
# 10 tokens -> Play game 10x
# This token we will be provided by user
token = eval(input("Enter Your Token Please: ")) # Evaluating the incoming value to its respective Data type