1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
seraphim [82]
3 years ago
13

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.
Computers and Technology
1 answer:
Anni [7]3 years ago
3 0

The program illustrates the use of loops and conditions.

Loops are used for repetitions, while conditions are used to make decisions

The game program in Python, where comments are used to explain each line is as follows:

#This initializes the point to 100

point = 100

#The following loop is repeated 4 times

for i in range(4):

   #This gets the current action

   action = input("Hit or Miss: ")

   #This following if statement calculates the point

   if action.lower() == "hit":

       point+=10

   else:

       point-=20

#This prints the calculated point

print(point)

Read more about loops and conditions at:

brainly.com/question/14284157

You might be interested in
To write on a cd-rw disc, users must have cd-rw software and a cd-rw ____.
Karo-lina-s [1.5K]
Hello there!

It would be A cd - rw Drive.

Hope This Helps You!
Good Luck :)
4 0
3 years ago
Assume that the array arr has been defined and initialized with the values {4, 2, 5, 3, 1}. What are the values in the array arr
Murrr4er [49]

Answer:

arr = [4, 2, 5]

Explanation:

The while loop will remove the array elements from the back.

5 0
3 years ago
I wiil mark brainlist ​
Darina [25.2K]
CAD is the answer you require, but it may also be Spread sheet

Hope this helped ♥︎
5 0
3 years ago
A _ shows the end of a page . ​
marta [7]

Answer:

page break shows the end of a page.

4 0
3 years ago
Read 2 more answers
What term is used to refer to the requesting of information from a database?
nekit [7.7K]

The answer is: Querying

3 0
2 years ago
Read 2 more answers
Other questions:
  • P3. In Section 4.2 , we noted that the maximum queuing delay is (n–1)D if the switching fabric is n times faster than the input
    8·1 answer
  • Productivity can best be described as:
    5·2 answers
  • Can you clone apps form your PC and to other PC?<br>Yes or No
    13·2 answers
  • Write a Comparator that compares String objects by the number of words they contain. Consider any nonwhitespace string of charac
    15·1 answer
  • . A possible data for source that could be used when completing a mail merge could be a(n)… : *
    13·2 answers
  • Which of the following is NOT a useful strategy when making an informed purchase ?
    7·1 answer
  • Plz help fast! will mark brainliest!<br><br>List three ways that music is used in modern society.
    6·1 answer
  • If you would like to give another user permissions on your mailbox or to particular folders within your mailbox, which role shou
    13·2 answers
  • Expectation on Information Technology Fundamental​
    12·1 answer
  • I’ll give brainliest if answers are correct
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!