Advertisement
Spocoman

02. Add and Subtract

Jan 28th, 2022
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. def result():
  2.     first_num = int(input())
  3.     second_num = int(input())
  4.     third_num = int(input())
  5.  
  6.     def add():
  7.         return first_num + second_num
  8.  
  9.     def subtract():
  10.         return add() - third_num
  11.  
  12.     return subtract()
  13.  
  14.  
  15. print(result())
  16.  
  17.  
  18. Или:)
  19.  
  20. def result():
  21.     return int(input()) + int(input()) - int(input())
  22.  
  23. print(result())
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement