Basic Arithmetic Game: In this exercise we will program a game to help kids learn integer addition and multiplication. When the program starts the following menu will be presented to the user:
Choose the level of difficulty:
1. Easy (numbers will be in the 0 - 10 range)
2. Medium (numbers will be in the 0 - 100 range)
3. Hard (numbers will be in the 0 - 1000 range) >>> _
Once the user chooses the level of difficulty,the following menu is presented:
Type the number of seconds that you want to play the game for: >>> _
When the user has entered the duration of the game the program starts presenting the user with either an addition or a multiplication question (chosen randomly) involving two numbers (both chosen randomly). When the user enters an answer the program prints out whether the answer was correct or not and moves to the next question. At the end of the time period of the game the program presents the user with the total number of question and the percentage that the user got right. A Sample run of the gamefollows:
Choose the level of difficulty: 1. Easy (numbers will be in the 0 - 10 range) 2. Medium (numbers will be in the 0 - 100 range) 3. Hard (numbers will be in the 0 - 1000 range) >>> 1
Type the number of seconds that you want to play the game for: >>> 30
The value of 4 x 4 = 16 Correct! Score: 1/1 Time Left: 20 seconds
The value of 9 + 4 = 12 Wrong! Score: 1/2 Time Left: 10 seconds
The value of 8 x 4 = 32 Correct! Score: 2/3 Time Left: 0 seconds

G A M E O V E R! You attempted 3 question in 30 seconds and got 66.6% of them right.

ddanbe commented: Double entry -3

Show your work so far, tell us what you're having trouble with, and then we can start to help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.