Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = input('Как тебя зовут?: ')
- print ('Привет,', name,'!')
- age = int( input('Сколько тебе лет?: '))
- print('Я думал, что тебе', age + 1, end = " ")
- x = age + 1
- if x <= 4 or x % 10 == 2 or x % 10 == 3 or x % 10 == 4:
- print ("года")
- elif x <= 19 and x >= 5:
- print ("лет")
- elif x % 10 == 1:
- print ("год")
- else:
- print ("лет")
- print ("-_-")
- do = input("Чем займёмся? 1.Калькулятор 2.Завершить: ")
- if do == "1":
- what = input("Что делаем? (+, -): ")
- a = float(input(" Введи первое число: "))
- b = float (input(" Введи второе число: "))
- if what == "+":
- c = a + b
- print ("Результат: " + str(c))
- elif what == "-":
- c = a - b
- print ("Результат: " + str(c) )
- else:
- print("Выбрана неверная операция!")
- elif do == "2":
- exit()
- else:
- print("Выбрана неверная операция!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement