Guest User

Untitled

a guest
Sep 27th, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. from math import *
  2. def start():
  3.     print('')
  4.     what = input('Что будем делать? (+,-, если ничего то ничего не пиши) :')
  5.     if what == "+":
  6.         print('')
  7.         a = float(input('Введи первое число: '))
  8.         b = float(input('Введи второе число: '))
  9.         c = a+b
  10.         print ("Ответ: " + str(c))
  11.     elif what == "-":
  12.         print('')
  13.         a = float(input('Введи первое число: '))
  14.         b = float(input('Введи второе число: '))
  15.         c = a-b
  16.         print ("Ответ: " + str(c))
  17.     else:
  18.         print('')
  19.         print('Закрытие...')
  20. start()
  21. while what in ["+","-"]:
  22.     start()
Advertisement
Add Comment
Please, Sign In to add comment