+ 1

Pull the Trigger - python core pro

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. My input : points = 100 def program(hit,miss,self): hit.self=hit miss.self=miss hit=10 miss=20 hike =input() print(hike)

12th Apr 2021, 7:44 AM
Veena Tirmal
Veena Tirmal - avatar
6 Answers
+ 1
Oh I didn't knew Slick
12th Apr 2021, 9:07 AM
Veena Tirmal
Veena Tirmal - avatar
0
it says it takes 4 action results as input. You could make a list of the input and loop through it. if hit, then add 10, else if miss, then subtract 20. Then print the result
12th Apr 2021, 8:24 AM
Slick
Slick - avatar
0
Michael posting straight code helps no one and you didnt even attempt to explain. Tighten up
12th Apr 2021, 11:46 AM
Slick
Slick - avatar
0
I don't have time for this, please don't comment again Slick thank you
12th Apr 2021, 12:35 PM
Veena Tirmal
Veena Tirmal - avatar
0
Im not speaking with you, so i don't really care. You don't have time, but you have enough to post that? Drop that attitude. You can unfollow, delete, or whatever to this post. So thats on you, hun. I happily have time to comment. So don't test me ;)
12th Apr 2021, 12:38 PM
Slick
Slick - avatar
0
Hey Sister Veena Kindly pls Contact me at suvarnapatil19085@gmail.com I want some guidance from you 😅
22nd Jul 2021, 1:16 PM
Rotace
Rotace - avatar