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

will you have no no square invasion time with me.
KICKSTARTER: Similarity and Compare and contrast the two sentences. A strong northerly wind blew furiously. Furiously blew a strong northerly wind.
what is the sum of the fractions 3over5 +7/5
Which compound is predicted to mimic the effect of exercise in undifferentiated muscle cells in vivo?
In certain conditions, hydrogen gas produces the emission spectra shown below. What causes the bright lines seen in the spectra?
PLEASE HELP ASAP THANK YOU!
2019kL is the same as__dL?
evaluate 8+ -8 plz help me i have a 20 page packet due tom and i need help
The sum of a number y and four is 13
HELP— graphing get marked brainliest