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
What is the significance of the vertical columns of the periodic table? what is the significance of the horizontal rows?
olga2289 [7]

Yes, horizontal rows are periods. “All of the elements in a period have a similar number of atomic orbitals. Each element in the top row (the principal time frame) has one orbital for its electrons. The greater part of the components in the second column (the second time frame) has two orbitals for their electrons. It goes down the occasional table that way. As of now, the most extreme number of electron orbitals or electron shells for any element is seven."<span>

<span>The vertical columns are groups. "The elements in a group have the same number of electrons in their outer orbital [and thus the same charge]. Every element in the first column (bunch one) has one electron in its external shell. Each element on the second segment (assemble two) has two electrons in the external shell. As you continue tallying the segments, you'll know what numbers of electrons are in the external shell.</span></span>

7 0
4 years ago
A space in a document that is typically in templates to hold pictures or text until the final text is inserted is called a _____
yKpoI14uk [10]

Answer:

D. placeholder

Placeholder are like the field you enter your username and passwords and etc. They can be easily understood my the name itself!

Hope this is the correct answer!

Bye!

6 0
4 years ago
Read 2 more answers
Heelp my brainly stuff says i am 49 but im 11 how to fix?X??
stich3 [128]

Make another account. But u cant get into brainly unless u r over 26 or something.

6 0
3 years ago
Supermarket managers who use scanners on the checkout counters to track inventory levels of their products are using a(n) ______
lidiya [134]
Operation Information System, because you are only collecting data on the amount of products leaving the store.
6 0
4 years ago
Why not to use settimeout in angular.
barxatty [35]

Answer:

start with what you know

Explanation:

you can learn alot

4 0
3 years ago
Other questions:
  • Implement a container class Stat that stores a sequence of numbers and provides statistical information about the numbers. It su
    7·1 answer
  • Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. Ex: If runTime
    12·1 answer
  • You have a number of digital pictures you recently took on your smartphone. You would like to share these pictures with all of y
    11·1 answer
  • What does Mishler mean by the foreground-background interaction? How can this affect the photographs, based on the examples in t
    14·2 answers
  • Answer the following questions which are based on the study "Patients' Engagement with Sweet Talk." Submit your answers to the e
    9·1 answer
  • The refresh or reload button is in the browser toolbar and usually looks like a pair of curved arrows. Clicking it will ________
    14·2 answers
  • What are the overheads associated with recursive algorithms? [
    9·1 answer
  • Write any three type of looping structure with syntax​
    13·1 answer
  • Write a python statement that print the number 1000
    6·1 answer
  • In a mobile app for computer technicians in a large college, an initial trigger event could be ____.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!