' |' '++'] (['++' ' |' ' |' ' |' '++'] (['++' ' |' '|' ' |' '++'] all_dice [ ad bd ad bd ad print('''dice mathby al sweigart al@inventwithpython com add up the sides of all the dice displayed on the screen you have {seconds to answer as many as possible you get {points for each correct answer and lose {point for each incorrect answer ''format(quiz_durationrewardpenalty) input('press enter to begin ' keep track of how many answers were correct and incorrect correctanswers incorrectanswers starttime time time( while time time(starttime quiz_durationmain game loop come up with the dice to display sumanswer dicefaces [ for in range(random randint(min_dicemax_dice)) die random choice(all_dice die[ contains the list of strings of the die face dicefaces append(die[ ] die[ contains the integer number of pips on the face sumanswer +die[ contains (xytuples of the top-left corner of each die topleftdicecorners [ figure out where dice should go for in range(len(dicefaces)) while true find random place on the canvas to put the die left random randint( canvas_width dice_width top random randint( canvas_height dice_height get the xy coordinates for all four corners left #top + project #