How do I make my while loop for pull the trigger work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

14th Oct 2021, 9:10 PM
Gemuh Hans
3 Answers
+ 2
What question it ? It is from lesson or one of the code coaches ?
14th Oct 2021, 10:05 PM
Abhay
Abhay - avatar
0
It's from the beginner python course.. the exercise is called pull the trigger.
17th Oct 2021, 5:41 AM
Gemuh Hans
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.
17th Oct 2021, 5:42 AM
Gemuh Hans