Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghost 馃懟馃懟馃懟馃懟 Game #82

Open
DanilGeryng opened this issue Apr 18, 2021 · 0 comments
Open

Ghost 馃懟馃懟馃懟馃懟 Game #82

DanilGeryng opened this issue Apr 18, 2021 · 0 comments

Comments

@DanilGeryng
Copy link

DanilGeryng commented Apr 18, 2021

39123332-beyder-d-chistyy-python-tonkosti-programmirovaniya-dlya-profi-39123332-300x424~2

for i in range(4): 
bob.fd(100) 
bob.lt(90)
from random import randint
print('Ghost Game')
feeling_brave = True
score = 0
while feeling_brave:
    ghost_door = randint (1, 3)
    print ('Three doors ahead...')
    print ('A ghost behind one.')
    print ('Which door do you open?')
    door = input('1, 2, or 3?')
    door_num = int(door)
    if door_num == ghost_door:
        print ('Ghost!')
        feeling_brave = False
    else:
        print('No ghost!')
        print ('You enter the next room.')
        score = score + 1
print ('Run away!')
print ('Game over! You scored', score)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant