6868timer_position = (25 , 215 )
6969timer_color = 0xFF00FF
7070timer_text_area = label .Label (trivia_font , max_glyphs = 20 , color = timer_color ,
71- x = timer_position [0 ], y = timer_position [1 ])
71+ x = timer_position [0 ], y = timer_position [1 ])
7272
7373# A function to shuffle trivia questions
7474def shuffle (aList ):
@@ -129,7 +129,7 @@ def faceOff(timerLength):
129129while True :
130130 # Load new question when screen is touched
131131 while not pyportal .touchscreen .touch_point :
132- pass
132+ pass
133133
134134 reveal_text_area .text = ''
135135 q_text_area .text = ''
@@ -159,15 +159,16 @@ def faceOff(timerLength):
159159 except RuntimeError as e :
160160 print ("Group full" , e )
161161 continue
162- for i , answer in enumerate (answers ):
163- ans_text_areas [i ].text = answer_choices [i ]+ ") " + unescape (answer )
162+ for k , answer in enumerate (answers ):
163+ ans_text_areas [k ].text = answer_choices [k ]+ ") " + unescape (answer )
164164
165165 faceOff (10 ) # 10 seconds with question
166166 time .sleep (2 ) # pause for 2 seconds to show which player tapped first
167167 faceOff (5 ) # 5 seconds to answer
168168 timer_text_area .text = ''
169169 # Show the correct answer
170- i = answers .index (correct_answer )
171- reveal_text = "Correct Answer:\n " + answer_choices [i ]+ ") " + unescape (answers [i ])+ "\n (Tap for next question.)"
170+ k = answers .index (correct_answer )
171+ reveal_text = ("Correct Answer:\n " + answer_choices [k ]+ ") "
172+ + unescape (answers [k ])+ "\n (Tap for next question.)" )
172173 print (reveal_text )
173- reveal_text_area .text = reveal_text
174+ reveal_text_area .text = reveal_text
0 commit comments