2.9.8 stop light codehs
I cant figure out how to do this stop light function on codehs help
(this is the assignment)
Write a program that prompts the user for a color: red, yellow, or green (the colors of a stoplight). Then using if statements and else statements, print the user a message describing what they should do. For example if the color was red, you could say something like, “Red light: you should stop.”

As a bonus, see if you can use “else if” in this problem. Check out “else if” in the “Docs” tab.

You may assume the user will only input “red”, “yellow”, or “green”. You do not have to worry about other colors, or mixed capitalization such as “blue” or “ReD”, but you can make your program handle these cases if you wish!

Answers

Answer 1

The program illustrates the use of conditional statements

Conditional statements are statements used to make comparison and decisions

How to write the program?

The program written in Python, where comments are used to explain each action is as follows:

#This gets input for the color

color = input("Color: ").lower()

#This checks if the input is red

if color == "red":

   print(“Red light: you should stop.”)

#This checks if the input is yellow

elif color == "yellow":

   print(“Yellow light: you should get ready.”)

#This checks if the input is green

elif color == "green":

   print(“Green light: you should go.”)

#This checks for invalid input

else:

   print(“Invalid")

Read more about Python programs at:

https://brainly.com/question/24833629


Related Questions

Check My Work An information system includes _____, which are programs that handle the input, manage the processing logic, and provide the required output

Answers

An information system includes applications, which are programs that handle the input, manage the processing logic, and provide the required output.

What are applications used in a computer system?

Applications are software program that helps a computer user to work effectively with the computer system.

It  helps the computer user by handling the input, managing the processing logic, and providing the required output.

Examples of application include:

Web browsersPresentation softwareSpreadsheetWord processors

Therefore, an information system includes applications, which are programs that handle the input, manage the processing logic, and provide the required output.

Learn more about application software here:

https://brainly.com/question/18661385

C-13 You just got a call from the University system administrator, who says that either you or your roommate is issuing denial-of-service attacks against other students from your shared network segment. You know you are not doing this, but you are unsure about your roommate. How can you tell if this accusation is true or not

Answers

Answer:

take a subtle aproach

Explanation:

disadvantages of using lossless compression rather than lossy compression​

Answers

Answer:

Larger files

Explanation

Lossless advantages and disadvantages Advantages: No loss of quality, slight decreases in image file sizes. Disadvantages: Larger files than if you were to use lossy compression.

Compression, Explained. We use compression to make files smaller, so that they take up less storage space and can be downloaded more quickly.

Lossless vs. Lossy Formats.

Lossy Compression. Lossy compression is useful because of its ability to shrink a file to a more convenient size

Select the Pixel Format to be either Mono8 or BayerRG8.

Ensure ISP Enable is not selected (disabled).

From the Image Compression Mode drop-down, select Lossless.

Select the Adaptive Compression Enable checkbox to allow dynamic updates to compression tables to achieve a better compression ratio.

[C Pointer] Not all arithmetic operations may be performed on pointers. For example, you cannot ________ or _______ a pointer.

Answers

It is not all arithmetic operations may be performed on pointers. For example, you cannot multiply or divide a pointer.

What arithmetic operations cannot be done on pointers?

We cannot carry out all type of arithmetic operations with the use of the pointers.

Note that the Pointer arithmetic is said to be a little bit different from arithmetic we normally use and as such, the only used arithmetic operations applicable on pointers are known to be the addition of numbers.

Learn more about arithmetic operations  from

https://brainly.com/question/4721701

By ___, browser cookies can improve a user's online experience.
A. keeping track of data
B. organizing photos
O C. blocking malware
O D. enabling networking

Answers

By keeping track of data, browser cookies can improve a user's online experience. So, option A. is the right choice.

By keeping track of data, browser cookies can improve a user's online experience. When a user visits a website, the website may store a small text file, called a cookie, on the user's device. These cookies contain information about the user's preferences, login status, browsing history, and ther relevant data.

Step 1: When a user visits a website, the website sends a cookie to the user's browser.Step 2: The browser stores the cookie on the user's device.Step 3: The next time the user visits the same website, the browser sends the stored cookie back to the website.Step 4: The website uses the information in the cookie to personalize the user's experience, such as remembering their login credentials, displaying customized content, or providing relevant recommendations based on their previous interactions.

By keeping track of data through cookies, websites can enhance the user experience by offering personalized content, saving preferences, and improving navigation. This helps users save time and have a more tailored online experience.

The right answer is option A. keeping track of data

For more such question on cookies

https://brainly.com/question/14252552

#SPJ8

Can anyone figure this out???? I need help ASAP!

Answers

Answer:

cant see

Explanation:

What do you understand by memory word?​

Answers

Answer:

Explanation:

a 5-bit memory in which the individual memory bits are content5_4 , content5_3 , content5_2 , content5_1 , and content5_0

Can anyone help me on assignment 8: personal organizer on edhesive?

Answers

Open the PDF attached and it has the code I used to answer it. It got me 100%. Hope it works for you <3

Question 5 of 10
When gathering information, which of the following tasks might you need to
perform?
O A. Apply standards, such as measures of quality, beauty, usefulness,
or ethics
B. Fill out forms, follow procedures, and apply math and science
C. Study objects, conduct tests, research written materials, and ask
questions
D. Seek out ideas from others and share your own ideas

Answers

Answer:

The answer is ( D ) I hope this answers your question

In a print statement, you can set the ________ argument to a space or empty string to stop the output from advancing to a new line. true false

Answers

In a print statement, a user can set the end argument to a space or empty string, in order to stop the output from advancing to a new line.

What is a print statement?

A print statement can be defined as a line of code that is used to send data to the print or println method of a programming system such as compiler.

In Computer programming, an end user can set the end argument to a space or empty string, in order to stop the output from advancing to a new line by using a print statement.

Read more on print statement here: https://brainly.com/question/21631657

what is the answer in online learning and digitalcitizenship

Answers

Answer: an online encyclopedia.

Explanation: encyclopedias often have constantly updated pieces of news, that are also accompanied by fact-checkers as well unlike newspapers.

Help me pls :)):)))))))))))))

Answers

Answer:

26.6 miles per gallon

How to copy and paste from pdf to word without losing formatting?.

Answers

Answer:

mac: cmd c, cmd v
windows: ctrl c, ctrl V

Windows: use pdf to word convertor
such applications like pdf elemnt, pdfX, smallpdf(.com) online convertors, etc to convert

Which of the following will Excel recognize as a date?
Group of answer choices

February 6 1947

2,6,47

2-Feb-47

None of the above

Answers

The option that shows how Excel recognize as a date is February 6 1947.

How does Excel see date?

The Excel  date is often seen as a regular number that is said to have been formatted to often look like a date.

One can you change the cell format to 'General' so that one can see the type of date serial number. Most times, the integer portion of the date serial number stands for the day, and the decimal portion stands for the time.

Read more about Excel from

https://brainly.com/question/25879801

Select all examples of ethical and appropriate use of business e-mails.

1 ) Claudia shares a joke with her coworkers.
2) Celia forwards an e-mail asking for donations to the relief fund for hurricane victims.
3) Lucia sets up a 2:00 meeting with her marketing team.
4) Iris sends a message about a rally to stop the sale of furs.
5) Ken deletes a message from his boss without reading it.
6) Karl sends a graphic to his coworker in an attachment. Karl sends a graphic to his coworker in an attachment.

Answers

Answer:

Number 3 only I believe, sorry if im wrong.

Explanation:

answer it correctly ​

Answers

Answer:

fertilizers: 950 bags

insecticides: P 2160.00

plowing: 5

harrowing: P 3150.00

Explanation:

What happens when the button is clicked? Open the functions drawer and look at each of the StateLibrary functions. Mouseover them for documentation. How do these functions work? Click "Manage Libraries" in the gear menu, then click "view code" for the State Library. Read the code. How do the library functions work? Were your predictions correct?

Answers

Library functions work by assesment through its function name.

What are Library functions?

Library functions are computer language that are made up of inbuilt functions which are grouped together in a place called library.

A library is the collection of resources or data used by computer programs for software development.

These resources may include:

configuration data,

documentation,

help data,

message templates and

pre-written code.

Therefore, Library functions work by assesment through its function name.

Learn more about library here:

https://brainly.com/question/5961530

Isabella is a network engineer. She would like to strengthen the security of her organization's networks by adding more requirements before allowing a device to connect to a network. She plans to add authentication to the wireless network and posture checking to the wired network. What technology should Isabella use

Answers

The technology that Isabella should  use to strengthen the security of her organization's networks is Network access control (NAC).

What is Network access control (NAC)?

Network access control (NAC), is popularly known to be  network admission control. This is said to be a kind of process that is known for hindering unauthorized users and devices from having any kind of access to any private network.

Note that the use of this Network access control (NAC) can help Isabella should  to strengthen the security of her organization's networks.

Learn more about  network engineer from

https://brainly.com/question/26563535

Anyone know an "unblocked" alternative of giggl, or hyperbeam, maybe discord for a school chromebook while i wait during class since i'm literally finished with everything, or can you tell me how to unblock things on the chromebook.

Answers

You can get a VPN via the place where you get on your browser. Any VPN with at least a 4.2-star rating should do the trick. If you are on chrome, I'd recommend  Adguard VPN. You can create an account for free.

All data and bookman accounts will now start to be deleted from your Chromebook. You can now use your Chromebook without any limitations once you've finished.

What are the ways to unblock things on the Chromebooks?

This makes sure that neither other users nor unauthorized individuals may access your data by removing the Chromebook's hard drive and reading it. A Chromebook's “owner” is the first person to log in, and they have the option to control who else is permitted to log in if they so decide.

A VPN can be obtained from the same location where you download your browser. Any VPN with at least a 4.2-star rating should do the trick. If you are on chrome, I'd recommend  AdGuard VPN. You can create an account for free.

Therefore, On your Chromebook, it is not possible to transfer owner permissions to another account.

Learn more about Chromebook here:

https://brainly.com/question/23567863

#SPJ5

In Scratch, what term refers to a message that gets passed along and causes an action to happen?
broadcast
mechanical
trigger
variability

Answers

Answer:

Broadcast

In scratch, let's use a block and a message as our example, when I receive and broadcast.

So you would put your syntax like this,

When green flag clicked

broadcast message1

 When I receive message1

 say Hello World!

Answer:

your answer is A. Broad cast

Explanation:

Ok. Explain this. Here are the two screenshots. Im offering 100 points.

Answers

Answer:

B

Explanation:

0.25>-0.25 because 0.25 is positive and further right on the number line.

Answer:

For the first one it's B cuz, 0.25>-0.25

0.25 is gr8r than negative 0.25

Explanation:

and for the second, I really don't know why it keeps saying that. I tried to answer a question and it said the same. Its kinda annoying

What device allows data to be processed into information

Answers

It’s a computer because it can be programmed to accept data

What feature preserves your open apps and data, but allows another user to log in to his or her own session of the same computer

Answers

A feature that preserves open apps and data while allowing another user to log in to his or her own session of the same computer is: switch user.

What is a computer?

A computer is an electronic device that is designed and developed to receive data from an end user in its raw form (input) and processes these data into an output that could be used for other purposes.

Generally, all computers are designed and developed with a feature called switch user, so as to preserve open software applications and data while allowing another user to log in to his or her own session of the same computer simultaneously.

Read more on computer here: brainly.com/question/959479

_________________ is a storage capability that removes duplicate chunks of data and replaces them with pointers back to a single original item.

Answers

Answer:

The answer is Deduplication

Which file in linux would i need to modify in order for a local user to connect to a new site i created by just entering the site name in the browser

Answers

I attached my answer because Brainly wouldn't let me post it. It is important  to be detailed since you are setting up a DNS server to do this.

a customer willl borrow

Answers

Answer: C. the PC

Explanation: The motherboard is not included in the passage

Gary was browsing through a programming website currently on prog. Edu/homepage. Html. There were few related links on the page. He clicked on a link that had the term "Learn Testing. " This link led him a website called learntotest. Edu/learntesthome. Html. Which is the entry page in this

case?

A. Learntotest. Edu/learntesthome. Html

Ð. Learntotest. Edu

C. Prog. Edu/homepage. Html

D. Prog. Edu

Answers

The entry page in this scenario above for Gary is  Learntotest. Edu/learntesthome. Html.

What is HTML?

HTML  is known as HyperText Markup Language. This is said to be a kind of code that is often written and  used to make standard a web page and all of its content.

Conclusively, Note that all HTML documents often begins with a document type declaration such as : <!DOCTYPE html>  as in the case above

Learn more about HTML from

https://brainly.com/question/4056554

________ is a location service that allows applications to know when a user has crossed a specific location and then triggers an automated action.

Answers

The location service that allows applications to know when a user has crossed a specific location to trigger an automated action is; Geofencing

What is geofencing?

Geofencing is a location-based service whereby an app or software uses GPS, RFID, Wi-Fi or even cellular data to trigger an already programmed action when a mobile device enters or exits a virtual boundary that is set up around a geographical location called a geofence.

Thus, the answer to the question would be geofencing as it tallies with the definition given above,

Read more about programs at; https://brainly.com/question/16397886

large technology company hosts hundreds of servers in a datacenter. The company invests a great deal of money into a risk prevention plan to protect the systems. One such solution is insurance that protects the hardware and the data. Which specific risk response strategy does the company utilize in this instance

Answers

The specific risk response strategy that the company utilize in this instance is risk transference.

What is Transference risk control strategy?

Transference risk control strategy is known to be a type of strategy that firms uses to decides how they can lower or shut down a risk that it has encountered to another firm.

Note that in this situation above, large companies, instead of they trying to work and settle the risk themselves, they tend to give it to another such as a third party.

Learn more about insurance from

https://brainly.com/question/25855858

When trying to find a machine that is needed to access the data can be difficult. What is this an example of?.

Answers

There are different kinds of computer language. The above is an example of Machine language. It is also a kind of input devices.

Why machine language?

Machine language is known to be a type of language that can only be understood by a computer. It is therefore very difficult for a person to understand as it is the only thing that the computer system can use.

When a person is trying to find a machine that is needed to access the data, it will be be difficult as one is not familiar with the machine language and what can be the best tool to use.

Learn more about Machine language from

https://brainly.com/question/5045657

Other Questions
When you have a loan on a house, commercial property, or land, it is known as what?MortgageOwners ManualPermitRent If y=3/8x-1 find the find the equations that are perpendicular and parallel to this line that passes through (8, -2) The point J(5,3) is rotated 90 counterclockwise around the origin. What are the coordinates of the resulting point, J' You can always trust information that comes from websites ending in. . com Write an informal letter in Spanish to a Spanish-speaking friend telling him or her about your plans after you graduate from high school. Make sure that you include all the components of a letter that you learned about, such as the recipient, the sender, the date and address, etc. Also, use the future progressive tense in your letter, where appropriate.**PLEASE INCLUDE THE RECIPIENT, THE SENDER, THE DATE, AND ADDRESS IN YOUR LETTER AND USE THE FUTURE PROGRESSIVE TENSE IN YOUR LETTER TOO WHERE APPROPRIATE** Read this passage from your science course. (The passage is from the lesson on speed.)Speedalso called average speedis an idea you live with every day. Sometimes you want to know how fast something is moving or can move. You may be interested in auto racing and want to know how fast one of the cars can go. You may be a goalie on your soccer teamand you want to know how fast the ball can be coming at you. To calculate speed, you can use a simple scientific formula r = d/t. The r stands for rate of motion (speed), the d stands for distance, and the t stands for time. So speed is equal to distance divided by time.Which answer best describes the structure of this passage?A. a definition of speed, followed by several examples of speed in actionB. description of event related to speed, followed by a definition of average speedC. rules for calculating speed in different settings, followed by examplesD. everyday examples of questions about speed, followed by the rule for figuring out speed Tyrell and Marianne start at the same point. Tyrell walks 2.5 miles north in a straight path. Marianne walks 6.0 miles east in a straight path. How many miles apart are they at the end of their walks rounded to the nearest hundredth mile? choose the imensions that represen this rectlangl answerlength:2/5width: 3/6length:2/4width:3/4length:2/3width:3/5length:2/3width:3/4 Use the Pythagorean theorem to find the value of b The diagram from Exercise 1 is shown at the right. Is it possible to find the measures of the unmarked arcs? Explain. Find the value of x of 2x 110 (x + 10) What does hydraulic force provide in a braking system?PowerHeat dissipationContact surfacePressure In a typical information security program, what is the primary responsibility of information (data) owner I can't figure this out PLEASE HELP!! Excerpt from SeaplanesRoberto BarerraCompare and contrast the textstructures used in paragraphs 2and 3.A) Paragraphs 2 and 3 usecause and effect to emphasizehow the seaplanes helpedAmerica win both World War Iand World War II.B) Paragraphs 2 and 3 useorder of importance. Paragraph2 discusses importance of the vehicles and paragraph 3 their importance in World Wars I and Il.C) Paragraph 2 is a descriptionof the three types of seaplaneswhile paragraph 3 uses sequencing to explain the invention and earlyuse of the water vehicles.D) Paragraph 2 usescomparison and contrast toexplain which vehicle is the bestand paragraph 3 explains theproblems and solutions Fabre faced in the invention. What is the scale factor??? How does a person stop being stressed out from school itself PLS HELP!!!!For each sequence determine whether appears to be a ARITHMETIC or GEOMATRIC or neither ( pictures attached) what is the probability of 0.25 Neither likely? Or nor unlikely? Help!!! Which of the following situations dose not have the same unit rate as the graph shown