Game description: the user needs to solve the math exercise generated by the computer.

Requirements to a programmer: knowledge of basic mechanics of working in the programming language which includes working with data input, data processing, data output, conditions and the while loop; formatting with f-strings; mathematics at the secondary level. Recommended age 11+ .

The program makes a mathematical expression with the answer within the limits specified by the programmer (for example, the result won't be less than 10 and greater than 100 - these values can be easily changed). Moreover, the algorithm maintains some statistics. The user has only one shot to give the right answer.

The example of the program work:

The computer has prepared some exercises. Fill in the answers. Type STOP to end the program **************************************** Your points: 0 Problems solved: 0 Right answers: 0 -------------------- 64 / 2 = ? Your answer? 32 Correct! Your points: 10 Problems solved: 1 Right answers: 1 -------------------- 21 - 2 = ? Your answer? 19 Correct! Your points: 20 Problems solved: 2 Right answers: 2 -------------------- 83 + 2 = ? Your answer? 85 Correct! Your points: 30 Problems solved: 3 Right answers: 3 -------------------- 11 * 1 = ? Your answer? 576 Wrong... The right answer: 11 Your points: 10 Problems solved: 4 Right answers: 3 -------------------- 53 + 10 = ? Your answer? banana Your answer? stop ********************************************* GAME STATISTICS: Problems solved: 4 Right answers: 3 Wrong answers: 1 Percentage of correct answers: 75% Come back now or later!

The game will stop when STOP is typed (wow), so, the game will run until the user needs a moment to chew it over with Twix.

The program may be used as a math trainer for young children. As usual, the algorithm can be improved by simplifying or complicating the exercises. You can come up with something in brackets, "play" with the order of operations. Just do what you want to do!

Purpose of the game: to demonstrate basic architecture of game (and educational) algorithms, to study the inventive approach of "doing the opposite" in relation to algorithms.

Connected to and don't forget to add bots!

© 2019-2023 Viktor Trofimov
© 2019-2023 Translation and adaptation by Danil Shentsov
[ Top page ]