Answer to Question #154267 in Python for Soni Singh

Question #154267

Draw a flowchart for the color of light to be displayed at a traffic

signal, by reading as input the current time t, the signal

switching time s and transition time u . Assume that● The color at t = 0 is red

(remains red from t = 0 to s − 1 )● After s seconds (i.e. at t = s ) color changes to yellow

(remains yellow from t = s to s + u − 1 )● After another u seconds (i.e. at t = s + u ) the color

changes to green(remains green from t = s + u to 2s + u − 1 )● After another s seconds (i.e. at t = 2s + u ) the color changes to yellow(remains yellow from t = 2s + u to 2s + 2u − 1 )● After another u seconds (i.e. at t = 2s + 2u ) the colorchanges back to red , which is displayed for s seconds andthe cycle continues(remains red from t = 2s + 2u to 3s + 2u − 1 )Note that red and green are displayed for s seconds, and yellow for u seconds.Assume all input variables t,s, u are positive integers .Print the color to be displayed at the end.



1
Expert's answer
2021-01-07T05:03:27-0500
Dear Soni Singh, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS