Advertisement
BbJLeB

05. Challenge the Wedding

Jun 6th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. # 05. Challenge the Wedding
  2.  
  3. totalMen = int(input())
  4. totalWomen = int(input())
  5. totalTables = int(input())
  6. counterTables = 0
  7. areTheTablesOver = False
  8. man = 1
  9. while man <= totalMen:
  10.     woman = 1
  11.     while woman <= totalWomen:
  12.         print(f"({man} <-> {woman}) ", end="")
  13.         counterTables += 1
  14.         if counterTables == totalTables:
  15.             areTheTablesOver = True
  16.             break
  17.         woman += 1
  18.     if areTheTablesOver == True:
  19.         break
  20.     man += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement