daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Mar 26th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2.  
  3.  
  4. class TeamsBuilder(object):
  5.  
  6.     def __init__(self, _filename, _centers_number,
  7.                  _teams_number, _limit_per_team):
  8.         self.file = open(_filename, 'r')
  9.         self.centers_number = _centers_number
  10.         self.teams_number = _teams_number
  11.         self.limit_per_team = _limit_per_team
  12.         print(self.file.read())
  13.  
  14.     def build_teams(self):
  15.         self.file.close()
  16.  
  17.  
  18. if __name__ == '__main__':
  19.     if len(sys.argv) != 5:
  20.         print('Nedostatochno ili slishkom mnogo parametrov - '
  21.               'zadayte imya fayla, kolichestvo centrov, '
  22.               'kolichestvo komand i limit kolichestva chlenov komandy')
  23.         exit(0)
  24.  
  25.     filename = sys.argv[1]
  26.     centers_number = sys.argv[2]
  27.     teams_number = sys.argv[3]
  28.     limit_per_team = sys.argv[4]
  29.  
  30.     teams_builder = TeamsBuilder(filename, centers_number,
  31.                                  teams_number, limit_per_team)
  32.     teams_builder.build_teams()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top