DerioFT

1131.py

Dec 5th, 2021
618
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | None | 0 0
  1. inter = 0
  2. gremio = 0
  3. draw = 0
  4. count = 1
  5.  
  6. data1, data2 = map(int, input().split())
  7.  
  8. if (data1 == data2):
  9.     draw += 1
  10.  
  11. elif (data1 > data2):
  12.     inter += 1
  13.  
  14. else:
  15.     gremio += 1
  16.  
  17. print('Novo grenal (1-sim 2-nao')
  18.  
  19.  
  20.  
  21. user_response = int(input())
  22.  
  23. while (user_response != 2):
  24.     if (user_response != 1):
  25.         print('Novo grenal (1-sim 2-nao)')
  26.         user_response = int(input())
  27.         continue
  28.     else:
  29.         data1, data2 = map(int, input().split())
  30.  
  31.         if (data1 == data2):
  32.             draw += 1
  33.         elif (data1 > data2):
  34.             inter += 1
  35.         else:
  36.             gremio += 1
  37.  
  38.         print('Novo grenal (1-sim 2-nao)')
  39.  
  40.         user_response = int(input())
  41.         count += 1
  42.  
  43. print('%d grenais' % count)
  44. print('Inter:%d' % inter)
  45. print('Gremio:%d' % gremio)
  46. print('Empates:%d' % draw)
  47.  
  48. if(inter > gremio) and (inter >= draw):
  49.     print('Inter venceu mais')
  50. elif(gremio > inter) and (gremio >= draw):
  51.     print('Gremio venceu mais')
  52. else:
  53.     print('Nao houve vencedor')
Advertisement
Add Comment
Please, Sign In to add comment