All pastes #456768 Raw Edit

Something

public python v1 · immutable
#456768 ·published 2007-04-25 00:14 UTC
rendered paste body
I updated the control flow to populate the sub lists according to the list index of the expected output               i=0	while i<len(ratings):	   j=0	   if i==1:		while j<7:		   r_i_list[j] = ratings[i+j+1]		   j=+1	   if i==8:		while j<9:	        	   s_i_list[j] = ratings[i+j+1]		   j=+1	   if i==18:		while j<5:		   w_u_list[j] = ratings[i+j+1]		   j=+1	   if i==24:		while j<2:		   s_b_list[j] = ratings[i+j+1]		   j=+1	   i=+1	self.parsed_ratings = [r_i_list, s_i_list, w_u_list, s_b_list]# Hey Trevor. Mostly minor bugs throughout the code. For example, /n instead of \n, =+ intead of +=. =+ says, "assign this variable to positive 1"!, but there is still a flow control problem in this statement, which is probably easier for you to find:        i = 0        while i < len(ratings):           j = 0           if ratings[i] == r_g:                while j < 7:                   r_i_list[j] = ratings[i + j + 1]                   j += 1           if ratings[i] == s_i:                while j < 9:                   s_i_list[j] = ratings[i + j + 1]                   j += 1           if ratings[i] == w_u:                while j < 5:                   w_u_list[j] = ratings[i + j + 1]                   j += 1           if ratings[i] == s_b:                while j < 2:                   s_b_list[j] = ratings[i + j + 1]                   j += 1           i += 1# These lists aren't actually being populated. By the time you get to this lineself.parsed_ratings = [r_i_list, s_i_list, w_u_list, s_b_list] # self.parsed_ratings is just an empty list. So by the time you get to this lineself.ratings_dict['Readability Index'] = self.readability_grades(list1[0])# you get an attribute error, because you can't use the find method on nothing# All my code changes are in the repo, under style_wrapper.py. Cheers :)