Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. width = input()
  2. height = input()
  3. def rectanglePerimeter(width, height):
  4. return ((width + height)*2)
  5. print(rectanglePerimeter(width, height))
  6.  
  7. width, height = map(int, input().split())
  8. def rectanglePerimeter(width, height):
  9. return ((width + height)*2)
  10. print(rectanglePerimeter(width, height))
  11.  
  12. % echo "1 2" | test.py
  13. 6
  14.  
  15. width = input()
  16. print(width)
  17. height = input()
  18. print(height)
  19.  
  20. 1 2
  21. Traceback (most recent call last):
  22. File "/home/unutbu/pybin/test.py", line 5, in <module>
  23. height = input()
  24. EOFError: EOF when reading a line
  25.  
  26. width, height = map(int, input().split())
  27.  
  28. test.py 1 2
  29.  
  30. width = int(input())
  31. height = int(input())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement