+ 1
How do I make my while loop for pull the trigger work
The loop am trying to execute prints no result and I can't seem to lay a finger on the problem with my loop. https://code.sololearn.com/c1PQ5tgN6oR7/?ref=app
3 Answers
+ 2
What question it ? It is from lesson or one of the code coaches ?
0
It's from the beginner python course.. the exercise is called pull the trigger.
0
Here is the problem
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.