Computer Science, asked by tanviharendra, 1 month ago

Write a program to output the signal status based on the signal colour taken as input. (PYTHON)

Signal colour———Signal status
Red ————————Stop
Yellow ———————Wait
Green ———————Go

Sample output—————>
Enter signal colour : Red
Enter signal status : Stop

IT IS “PYTHON”…..PLEASE HELPP

Answers

Answered by chiranjibdas1744
1

Answer:

x= signal colour

a= stop

b= wait

c=go

print(a,b,c)

Answered by lohitjinaga5
1

Answer:

Once the colour has been entered, we use conditional statements to test for each possible colour. A conditional statement is used to check for a given requirement or condition. In this case, the conditions are trying to figure out which colour the user could've entered and accordingly proceeding with the output. If the colour is Red, it will print STOP. If not, it will move to the next condition, which is Yellow. If it's Yellow, it will print WAIT and the same thing happens for Green as well.

Similar questions