You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: days/19-21-itertools/README.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ After watching the first 4 videos pop into your Python shell and start playing a
16
16
17
17
Yep that's right! For your second day, use itertools to create a script that simulates traffic lights!
18
18
19
+
The idea is to perhaps... *cycle* (hint hint!) through the different colours of a set of traffic lights - red, amber and green - printing the name of the colour every time the cycle occurs.
20
+
21
+
For bonus points: traffic lights normally cycle between green and red based on traffic levels so you never know exactly when the change will happen. This is a great chance to throw some randomness into your script.
22
+
19
23
If you get absolutely stuck, watch the *Traffic Lights* video to see how we did it.
20
24
21
25
@@ -40,4 +44,4 @@ Be sure to share your last couple of days work on Twitter or Facebook. Use the h
40
44
41
45
Here are [some examples](https://twitter.com/search?q=%23100DaysOfCode) to inspire you. Consider including [@talkpython](https://twitter.com/talkpython) and [@pybites](https://twitter.com/pybites) in your tweets.
42
46
43
-
*See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).*
47
+
*See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).*
0 commit comments