- 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.
2 Respuestas
+ 2
You need:
loops
if, elif, else
input
output
0
If hit:
Input + 10
Elif miss:
Input - 20
It is not writen the rite way its just to get you started