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
Functions of barriers include (mark all that apply): A. Define boundaries B. Design layout C. Deny access D. Delay access
gayaneshka [121]

Answer:

A. Define boundaries

C. Deny access

D. Delay access

Explanation:

A barrier is a material or structure used to prevent or block access. Barriers can either be natural or structural and are used for many purposes usually for security reasons. The following are functions of barriers either natural or structural:

  1. Define areas of boundaries
  2. Delay or slow access. Example is the use of speed bumps to slow down vehicles.
  3. Provide access to entrances such as the use of gates
  4. Deny access to unauthorized personnel and allowing authorized personnel.
4 0
3 years ago
What will the following loop display? 0 1 2 3 4 5 0 1 2 3 4 0 1 2 3 4 The loop will display numbers starting at 0, for infinity.
Sidana [21]

Answer:

muestra números que comienzan en 0

Explanation:

7 0
4 years ago
When a typist changes from a conventional typewriter to a word processor, his typing schema will have to _____ to incorporate th
Elis [28]
<span>The schema will have to accommodate to make the person more easily able to perform the new task. Accommodation allows the new information to be made a part of a schema without changing the overall concepts in the schema. The schema itself stays unchanged for the most part, but the new information is more of a "tweak" to the schema than a full-on update.</span>
8 0
4 years ago
A __________is a software program that appears to be a physical computer and executes programs as if it were a physical computer
svlad2 [7]

Answer:

Virtual Machine

Explanation:

<em> I had to look this up, since there were no options from the question. If this is wrong, let me know!</em>

8 0
2 years ago
Open and close ____ immediately following the name of a procedure identify a Visual Basic statement as a procedure call statemen
Bezzdna [24]

Answer:  Parentheses

Explanation:

 The open and close parentheses basically identify the visual basic statement   in the procedure call statement.

The close procedure basically in the visual basic statement basically terminate the call of a program that performed the real processing. Open and close is also known as right and left parentheses.

The close statement is basically control the pre-defined programming statement in the particular close procedure.

 

4 0
4 years ago
Other questions:
  • A data structure used to bind an authenticated individual to a public key is the definition of ________.
    14·1 answer
  • Which of the following applications can be used as a data source for a Microsoft® Word® mail merge? A.Outlook Contacts B.Microso
    9·2 answers
  • Enter the value of 5⋅(13.5−4.5). <br> ​
    5·1 answer
  • High capacity circuits are limited by the least capable network link, which is typically the user connection. As such, it is imp
    11·1 answer
  • This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three dou
    11·1 answer
  • What is the decimal representation of the following signed binary numbers?
    6·1 answer
  • Write a Java application that uses the Math class to determine the answers for each of the following: a. The square root of 37 b
    10·1 answer
  • Which of the following aspects of a computer is responsible for making sense of input? processing output memory storage
    14·2 answers
  • Writing a function that implements a loop to collect a set amount of data. The function should use the serial object, the record
    9·1 answer
  • where element is the Hypertext Markup Language (HTML) element and _____ pairs define the styles that are applied directly to tha
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!