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]
2 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]2 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
Which of the following actions is an example of "window dressing?" a. Using some of the firm’s cash to reduce long-term debt. b.
marshall27 [118]

Answer:

Option D is the correct option.

Explanation:

Window dressing is the type of process by which a firm provides the improvement in fundamental or long-run positions and also they develop their basic values. It does not use the assets of the firm to minimize the long-term debt. So, that's why It borrows the long-term debts through retire the short-term debt that maintain the present ratio of the firm.

6 0
3 years ago
Which best describes color blindness?
lys-0071 [83]

What are the options?

If there are none...

MONOCHROMATIC would be your answer.

5 0
3 years ago
Plz..... Add the following Binary numbers 1. 111000 + 1100 + 111111​
Korvikt [17]

Answer:

11000011

Explanation:

This is because of the rules of bas 2

3 0
2 years ago
I need an answer and fast What happens if a sequence is out of order?
horsena [70]

Answer:

i would say A

hope i helped <3

Explanation:

4 0
3 years ago
Read 2 more answers
When you tap or click the ____ button for a selected graphic, Word provides options for changing how a graphic is positioned wit
Snowcat [4.5K]
<span>You have to click on "layout options" to enable you to change the positioning of a graphic within a Word document. You will be able to change how the graphic wraps around text, is scaled to the page/document and if it should have borders etc around it.Hope this helps. Let me know if you need additional help!</span>
5 0
3 years ago
Other questions:
  • For security reasons a network administrator needs to ensure that local computers cannot ping each other. which settings can acc
    5·1 answer
  • To rename a database object, press and hold or right-click the object in the navigation pane and then tap or click ____ on the s
    10·1 answer
  • Csc105 final graded project
    9·1 answer
  • Your task is to write a C program that measures the latencies of various system calls. In particular, you want to know 1) the co
    5·1 answer
  • Complete the second clause of the following Prolog program for member/2 where member(X, Y) checks whether X is an element (a mem
    7·1 answer
  • (20points)
    6·1 answer
  • High level languages are closer to machine language than humans yes or no​
    12·2 answers
  • Explain how you think robotics plays a part in the subway driver's job.
    13·2 answers
  • The _____ of a story describes the time and location of a story.
    5·2 answers
  • A wireless ________ extender is a network device that enhances transmission of your wireless signal.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!