# polite_reader: a program to read in a data file and get # some info from it, politely asking for the input # a hashtag (#) tells both python and Gurobi that you are making a comment # ######################################################## # ask for some constants n = input("How many groups? ") d = input("How many presentation days? ") input_data = input("What is the name of the data file (include quotes)? ") # ######################################################## # ######################################################## # Main program: # ######################################################## inp = open(input_data,"r") # we open the data file and call it "inp" for i in range(n): # this means for i = 0,1,2,3,...,n-1 inp_line = inp.readline() # read one line of inp, call it inp_line # just for diagnostics print("I just read the line: " + inp_line) # parts_of_line = inp_line.split(",") # this splits the input by , print("Name of project: " + parts_of_line[0]) prefs = parts_of_line[1] for j in range(d): print("Choice " +str(j+1)+ ": " + prefs[j] ) print("\n\n") inp.close() # we close file that we opened