Solutions
B (C also works but it is difficult to read and debug because of the use of separate if blocks instead of if..else if ..else)
A B waits for a green light but as it hasn’t pulled up to the light, the driver cannot see it so just waits forever C would be better off using selection in a loop and the “wait” doesn’t check that the light turns green before moving off.
C
B
A & D
A & B
C
D
Last updated