Advertisement
vesso8

06.Substitute

Dec 21st, 2020
112
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. first_number = int(input())
  2. second_number = int(input())
  3. third_number = int(input())
  4. fourth_number = int(input())
  5. are_they_right = False
  6. number_of_changes = 0
  7. subs = 0
  8.  
  9. for first in range(first_number,9):
  10.     if first % 2 == 0:
  11.         for second in range(9,second_number - 1,-1):
  12.             if second % 2 != 0:
  13.                 for third in range(third_number,9):
  14.                     if third % 2 == 0:
  15.                         for fourth in range(9,fourth_number - 1,-1):
  16.                             if fourth % 2 != 0:
  17.                                 if first == third and second == fourth:
  18.                                     print("Cannot change the same player.")
  19.                                 else:
  20.                                     subs += 1
  21.                                     print(f"{first}{second} - {third}{fourth}")
  22.                                     if subs == 6:
  23.                                         are_they_right = True
  24.                                         exit()
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement