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 type of network is created when you use encrypted tunnels between a computer or a remote network and a private network thr
Deffense [45]
<span>Virtual private network (VPN) is the answer</span>
3 0
3 years ago
Your friend just gave you his old laptop. Whenever you turn on the laptop, though, a black screen appears and asks you to enter
Anastasy [175]

Answer:
C is the answer!

Explanation:

A hard drive contains your operating system which can include your settings and preferences that you included in your device. But it mostly is a storage device so we know it WOULD NOT BE (B.

WOULD NOT BE D beacause powering it back on wouldnt do anything but bring you back to the start.

WOULD NOT BE A beacuse when taking out the battery then putting it back in would just be like turning it off then back on beacuse that just hold the power to a device.

IT WOULD BE C, C IS THE ANSWER beacuse a CMOS batttery contains the main system settings and  also contains information so i think C would be the best answer for this choice.


Hope this helps!
xx <3

7 0
2 years ago
Consider the following declaration: (1, 2) double currentBalance[91]; In this declaration, identify the following: a. The array
Rom4ik [11]

Answer:

Following are the solution to the given choices:

Explanation:

Given:

double currentBalance[91];//defining a double array  

In point a:  

The name of the array is= currentBalance.  

In point b:  

91 double values could be saved in the array. It requires 8bytes to hold a double that if the array size is 91*8 = 728

In point c:  

Each element's data type is double.

In point d:  

The array index range of values is between 0 and 90 (every array index starts from 0 and ends in N-1, here N=91).  

In point e:  

To access first element use currentBalance[0], for middle currentBalance[91/2] , for last currentBalance[90]

3 0
2 years ago
Write one for loop to print out each element of the list several things. then write another for loop
Kay [80]

Question:

Write one for loop to print out each element of the list several_things. Then, write another for loop to print out the TYPE of each element of the list several_things.

Answer:

The solution in python is as follows:

for element in several_things:

    print(element)

   

for element in several_things:

    print(type(element))

Explanation:

The solution assumes that the list several_things has already been initialized.

So, the rest of the code is explained as follows:

This line iterates through the list, several_things

for element in several_things:

This line prints each element

    print(element)

This line iterates through the list, several_things for the second time    

for element in several_things:

This line prints the type of each element

    print(type(element))

6 0
2 years ago
What are the correct answers to the following questions?
Lena [83]

Answer:

1. analog sound

2. digital sound

3. pixels

4.  local area network

5.bus

6. slots

Explanation:

4 0
2 years ago
Other questions:
  • _____ allows you to use the internet for making phone calls instead of leasing traditional telephone lines from the phone compan
    6·1 answer
  • A high-angle shot is the same thing as a bird’s-eye shot. True False
    11·2 answers
  • A terrible new disease, HORSEVID, has begun to spread among horses worldwide. Stable manager Jimmy is trying to take as many pre
    5·1 answer
  • What are the types of hypervisiors ?
    5·2 answers
  • What is the default text-wrapping option when inserting images into a Word document?
    5·2 answers
  • wants to redesign the user interface. The customer service agents use ________ to enter explicit statement to invoke operations
    11·1 answer
  • Which components exist in the contextual tab for tables called Design? Check all that apply.
    15·2 answers
  • Which of the following is NOT a possible combination of values of the variables in this program when it finishes running?
    6·2 answers
  • when I turn on my pc using a graphics card, it does give video, and everything is normal, but when I try to turn on my pc with t
    8·1 answer
  • Which statement is true of the digital sound produced by a computer using a<br> lower sample rate?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!