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
236. A system such as a printer, smart TV, or HVAC controller, typically uses an operating system on what is called a:
irakobra [83]

Answer:

Embedded System

5 0
2 years ago
Read 2 more answers
A. A set of electronic program that makes of computer perform tasks
Nonamiya [84]

Answer:

2. Software

Explanation:

Software is an app

Hardware is the computer or cell phone or mobile phone

toppr

6 0
2 years ago
In the context of firewall as a nonbiometric security measure, a _____ is software that acts as an intermediary between two syst
irga5000 [103]

Answer:

Proxy Server                        

Explanation:

  • Proxy server is a server that acts as a mediator between two systems.
  • One system can be your computer and the other can be the server to which you are asking a service, such as requesting a web page.
  • Lets suppose you request a web page from a server and you type a URL of a website to access a web page.
  • This request goes to proxy server which sends this request on your behalf to the target server in order to retrieve that web page.
  • Proxy server makes this request to the target server on the internet by using one of its IP addresses.
  • When the proxy server gets that web page, it will forward that web page to your requesting computer.
  • If you request a specific service such as a website frequently the proxy server saves that website on its cache.
  • So if you request that website again, proxy server will forward it to you from its cache rather than requesting it again from the target server on your behalf resulting in quick response to the user's request.
  • Proxy servers provide users with privacy to access the websites, and they can surf the internet anonymously .
8 0
3 years ago
(display five messages) write a program that displays welcome to java five times.
Nitella [24]
<span>/** * * * Exercise 1.2 - Display Five Messages * */ public class Ex01_02 { public static void main(String[] args) { System.out.println("Welcome to Java"); System.out.println("Welcome to Java"); System.out.println("Welcome to Java"); System.out.println("Welcome to Java"); System.out.println("Welcome to Java"); } }</span>
4 0
3 years ago
System analysis and design
Oksana_A [137]

Answer:

teachers go hard on you dont they

Explanation:

5 0
4 years ago
Other questions:
  • Why is it important to match the latencies fo the older modules to the newer modules?
    14·1 answer
  • Which part of the Office interface is located across the top of the application window and organizes common features and command
    13·1 answer
  • Most operating systems perform all of the following tasks except _____. a. displaying the Graphical User Interface b. indexing t
    13·1 answer
  • Select the correct answer.
    8·1 answer
  • Why would online learning make you lazy
    13·1 answer
  • Write a program that takes paragraph from the user and prints all unique words in that paragraph using strings in c++
    5·1 answer
  • Write function that ask for input from a user. Use this input as input for the countdown function that we wrote using the while
    6·1 answer
  • Identify the symbol. please help!!<br>​
    7·2 answers
  • Cache memory and RAM both are based on transistor based then why cache memory is needed if we already have RAM (Random Access Me
    6·1 answer
  • Write a short program that asks the user to enter a month &amp; prints a message based on the month
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!