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
By default, after how much time has elapsed in a client's DHCP lease will the client attempt to renew the lease?
maw [93]
The client will attempt to renew halfway through the time of the lease.
3 0
3 years ago
Which of the following exhibit temporal locality: 1. Repetition control flow 2. Linear search on an array of integers 3. Accessi
Tom [10]

Answer:

1, 2 and 3

Explanation:

Temporary locality occurs when a program accesses an instruction or a  data, there is a high probability that this  same instruction or data will be accessed again soon.

6 0
3 years ago
provide(s) many scalability benefits by offering additional network and storage resources on demand and services like autoscalin
Salsk061 [2.6K]

Answer:

The answer is cloud services.

Explanation:

The other answer choices just don't make sense. Python is a coding language and has nothing to do with scalability. Benchmarking has to do with finding out how powerful your system is. Denial of Service is when a website doesn't allow you to access it due to their servers being down.

6 0
3 years ago
A poetry reading is a type of<br> A. performance<br> B. blog<br> C. installation<br> D. zine
Verizon [17]
A. performance because a poetry reading is when a poem is read out loud to an audience.
6 0
3 years ago
Read 2 more answers
Which of the following is true about analog recording
skelet666 [1.2K]
Nothing is showing for me
3 0
3 years ago
Other questions:
  • Wi-Fi is designed for medium-range transfers, up to ____ feet outdoors. Answer 100 300 500 900
    13·1 answer
  • What is an activity that can help you enhance the appearance of your computer’s desktop?
    13·1 answer
  • USDA-APHIS Animal Care Resource Policy #12 "Considerations of Alternatives to Painful/Distressful Procedures" states that when a
    11·1 answer
  • Which method of accessing FTP has the most limited capabilities?
    9·2 answers
  • A ________ is a member function that is automatically called when a class object is
    6·1 answer
  • FTP is commonly used to __________ and __________ files to a server.
    12·1 answer
  • The ________ tier of the three-tier architecture consists of computers, phones, and other mobile devices that have browsers that
    6·1 answer
  • Which devices typically generate computer output? monitor, printer, speaker, projector, keyboard mouse, printer, speaker, projec
    7·1 answer
  • Space cushion includes
    8·2 answers
  • Three reasons Why we connect speakers to computers
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!