-
-
Save ordanax/5709b6acc7ed1cef60e00c5fa9785490 to your computer and use it in GitHub Desktop.
python_army
This file contains 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
#!/usr/bin/env python3 | |
def army(): | |
print ("Мы набираем людей в армию!") | |
name = input("Как Вас зовут? ") | |
print("Привет,",name) | |
age = int(input('Сколько вам лет?: ')) | |
if age < 18: | |
print("Тебе всего ", age, ", рано тебе еще в армию!") | |
elif age == 18: | |
print("Отлично! Тебе есть 18, значит берем!") | |
elif age > 18 and age < 25: | |
print("Тебе ," , age,"? Где ты сколько лет скрывался от армии?") | |
else: | |
print("Тебе уже ", age,"." "Стариков не берем!") | |
army() # вызов функции | |
army() # ещё один вызов функции | |
army() # и ещё раз |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment