Say what to do for each light colour.
Many decisionsIntermediate
Built from 3 kinds of block, between Start and End. Each one has a guide.
B4Coder writes the same program as real code. Change the flowchart in the editor and the code changes with it.
colour = input("What colour is the light? (red, yellow or green) ")if colour == "red": print("STOP! 🛑")elif colour == "yellow": print("Get ready… ⚠️")elif colour == "green": print("GO! 🟢")else: print("Hmm, traffic lights are only red, yellow or green.")How each block becomes code: Python · Java · C++ · C# · JavaScript