Files
PythonGames/Дом с привидениями2.py
2017-02-05 16:38:26 +02:00

24 lines
849 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Ghost Game
from random import randint
print('Дом с привидениями')
feeling_brave = True
score = 0
while feeling_brave:
ghost_door = randint(1, 3)
print('Впереди три двери...')
print('Привидение за одной из них.')
print('Какую ты откроешь?')
door = input('1, 2 или 3? ')
door_num = int(door)
if door_num > 3 or door_num < 1:
print('Не обманывай!!!')
else:
if door_num == ghost_door:
print('ПРИВИДЕНИЕ!!!')
feeling_brave = False
else:
print('Привидения нет.')
print('Ты переходишь в следующую комнату')
score = score + 1
print('Убегай!')
print('Ты проиграл! Твой счёт', score)