(Solved)Here is another Code Coach i can't do (Hit or Miss)
You are making a game! The player tries to shoot an object and can either 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. Use a while loop to take input during each iteration and calculate the points. Here is my attempt(Copied it from someone): score = 100 shots = 4 while shots>0: result = input() if result == "hit": score+=10 shots-=1 elif result == "miss": score-=20 shots-=1 print(score)