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
Readme [11.4K]
3 years ago
10

2.9.8 stop light codehs

Computers and Technology
1 answer:
skelet666 [1.2K]3 years ago
7 0

The program illustrates the use of conditional statements

Conditional statements are statements used to make comparison and decisions

<h3>How to write the program?</h3>

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:

brainly.com/question/24833629

You might be interested in
The multitasking, multi-user, operating system developed by Bell Laboratories that operates on a wide variety of computing platf
olasank [31]

Answer:

Unix

Explanation:

UNIX is simply an operating system developed by Bell Laboratories in the 1960s. Ever since then, it has been constantly worked upon and developed. It is an operating system because it is a suite of programs capable of making a computer to function. Unix is considered to be a stable, multi-user, and multi-tasking system for both desktops and laptops and even servers.

8 0
3 years ago
What are two example of ways an electronic record may be distributed to others?
murzikaleks [220]
By email or publishing on the internet, I hope that helps!
4 0
3 years ago
What does the Autosum feature on excel do?
BabaBlast [244]
The answer is 1. Pressing the Autosum button highlights the ten cells above it so that you can easily add things together. Hope this helps!
8 0
4 years ago
What does limited access to a document mean?
Vlad [161]

Answer:

D. It does not reflect any changes made in the document

Explanation:

A limited access is usually done by middle level and top level managers in an organisation to prevent other staff member to edit or make changes to confidential documents when they are out of the office, though the staff can read it, they can not make changes to it.

6 0
3 years ago
Read 2 more answers
How do I delete my Brainly account?
Triss [41]

Answer:

yeah how? please tell me

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • What is the primary purpose for a screen saver in windows?
    8·1 answer
  • What is variable declaration in java ​
    6·2 answers
  • The Apple iPhone was a revolutionary product when it was introduced in 2007. To what extent do you agree or disagree with this s
    8·1 answer
  • When installing a device driver, start the computer in
    6·1 answer
  • Which key should you press and hold to select multiple cells?
    8·2 answers
  • How does a Cloud-first strategy approach a client's migration to the Cloud?
    11·1 answer
  • 我对汉语的兴趣 làm đoạn văn theo đề trên​
    14·1 answer
  • Which of the following online creation tools will be used if a person wants to create a video presentation?
    8·1 answer
  • Examples of how the development of coding changed the way we live. What type of technology was created as a result of code?
    10·1 answer
  • ________ has the ability to drag windows to the edges or corners of your screen and have them snap into place.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!