Anonymous9865 Anonymous9865
  • 02-09-2020
  • Computers and Technology
contestada

Write a program to output the signal status based on the signal colour taken as input.
SIGNAL COLOR SIGNAL STATUS
RED STOP
YELLOW WAIT
GREEN GO

Respuesta :

tonb
tonb tonb
  • 02-09-2020

Answer:

colour = "YELLOW"

signalMap = {  

 "RED" : "STOP",

 "YELLOW" : "WAIT",  

 "GREEN" : "GO"

}

print(colour + " means " + signalMap[colour])

Explanation:

Since python doesn't have switch statements, this map is a useful alternative.

Answer Link
ssheikha911
ssheikha911 ssheikha911
  • 02-09-2020
What subject is this
Answer Link

Otras preguntas

whoever gets it right gets brainliest
tell me, in detail, why are you answering my "questions"?
I will mark brainliest!
Write 0.0035 as a percent.
Select the phrase that best completes the conversation. Eva: ¿Qué medidas tenemos en caso de maremotos para alertar las personas? Laura: Guatemala tiene _______
Which of the following is sold on a commodity market? A. Primary products B. Manufactured products C. Processed foods D. Precooked foods
Plz can anyone help me on this ASAP?!! The questions are shown in the image below.
I need help please someone help me!!!
summary of the four freedoms speech ​
Jimmy's satellite radio bill is automatically deducting $15 from his bank account every month. How much will the dedication total for the year?