Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. while True:
  2. x = (input('First number:'''))
  3. y = (input('Second number:'''))
  4. arithmetic = (input('Choose operation:'''))
  5. if arithmetic =="+":
  6. print('{} + {} = '.format(x, y), end='')
  7. print(int(x)+int(y))
  8. elif arithmetic == '-':
  9. print('{} - {} = '.format(x, y), end='')
  10. print(int(x)-int(y))
  11. elif arithmetic == '/':
  12. print('{} / {} = '.format(x, y), end='')
  13. print(int(x)/int(y))
  14. else:
  15. print('Неизвестная операция')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement