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
A word root is used to link a suffix that begins with a vowel. Which of the following words is an example of this rule? Group of
QveST [7]

Answer:

The answer is A.

Explanation:

5 0
4 years ago
What are two benefits of a cloud based system
rewona [7]

Answer:

1 - Reduced resource costs used for data backup.

2 - Improved collaborative work process.

7 0
3 years ago
Read 2 more answers
Please I have been having a problem with this assignment of mine but I have not gotten an answer. Idiot know if anybody could be
ICE Princess25 [194]

Answer:

ummm

Explanation:

your on your own it doesn't makes since

3 0
3 years ago
1 _ A Unit of information containing the object's position: rotation, and scale values is called:
Damm [24]

Answer:

an inform

Explanation:

A information is an inform

4 0
3 years ago
The primary benefit to client/server applications is that multiple people can be working with the same data at the same time
yawa3891 [41]

Answer:

uhhh false i think

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • WILL MARK BRAINLYIST
    15·2 answers
  • Dfd symbols are referenced by using all ____ letters for the symbol name.
    9·1 answer
  • How it print media used? ​
    9·1 answer
  • The default case is required in the switch selection statement.
    12·1 answer
  • 2. Use the Internet to research Robocopy switches and then construct a command line that will use Robocopy to copy files in rest
    14·1 answer
  • In a folder hierarchy, the top level is referred to as which of the following?
    7·1 answer
  • Draw the resistor’s voltage and current phasors at t=15ms. Draw the vectors with their tails at the origin. The orientation of y
    5·2 answers
  • Is a free verse a poetry that has no images
    5·2 answers
  • Why does elephant has thicker legs? Explain in terms of breaking stress?​
    15·1 answer
  • Your program has a loop. You want to exit the loop completely if the user guesses the correct word.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!