- 2

How can i solve this problem? I'd appreciate your help

You are making a game! The player tries to shoot an object and can hit or miss it. The player starts with 100 points, with a hit adding 10 points to the player’s score, and a miss deducting 20 points. Your program needs to take 4 action results as input ("hit" or "miss"), calculate and output the player’s remaining points. Sample Input hit hit miss hit Sample Output 110 Explanation: 3 hits add 30 points, one miss deducts 20, making the total points equal to 110.

3rd Oct 2021, 11:02 PM
Kelbis Hernandez
Kelbis Hernandez - avatar
2 Réponses
+ 2
You need: loops if, elif, else input output
3rd Oct 2021, 11:10 PM
Simon Sauter
Simon Sauter - avatar
0
If hit: Input + 10 Elif miss: Input - 20 It is not writen the rite way its just to get you started
4th Oct 2021, 1:30 AM
Lz1234