Advertisement
Nenogzar

Untitled

Nov 21st, 2023
900
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. coordinate_a = list(map(int, input("A: ").split()))
  2. coordinate_b = list(map(int, input("B: ").split()))
  3. coordinate_c = list(map(int, input("C: ").split()))
  4. coordinate_d = list(map(int, input("D: ").split()))
  5.  
  6. coordinates = [coordinate_a, coordinate_b, coordinate_c, coordinate_d]
  7.  
  8. small = coordinates[0]
  9. larg = coordinates[0]
  10.  
  11. for coordinate in coordinates[1:]:
  12.     if len(coordinate) < len(small):
  13.         small = coordinate
  14.  
  15.     if len(coordinate) > len(larg):
  16.         larg = coordinate
  17.  
  18.  
  19. print("май - малкия", small)
  20. print("най - големия", larg)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement