June 2021
Beginner
432 pages
9h 8m
English
This program displays a digital clock with the current time. Rather than render numeric characters directly, the sevseg.py module from Project 64, “Seven-Segment Display Module,” generates the drawings for each digit. This program is similar to Project 14, “Countdown.”
When you run digitalclock.py, the output will look like this:
__ __ __ __ __ __
| | |__| * __| __| * __| |__
|__| __| * __| __| * __| |__|
Press Ctrl-C to quit.
The digital clock program looks similar to Project 14, “Countdown.” Not only do they both import the sevseg.py module, but they must split up the multiline strings ...
Read now
Unlock full access