Time for some fake graphics! Let’s say we want to draw game boards that look like this:
This one is 3x3 (like in tic tac toe). Obviously, they come in many other sizes (8x8 for chess, 19x19 for Go, and many more).
Ask the user what size game board they want to draw, and draw it for them to the screen using Python’s
Remember that in Python 3, printing to the screen is accomplished by
Hint: this requires some use of functions, as were discussed previously on this blog and elsewhere on the Internet, like this TutorialsPoint link.
The main topic of this exercise is functions. They are tricky, and deserve lots of practice and thought. Here are a few links in case you want some more reading.
There are hundreds more out there - read and practice away!
Forgot how to submit exercises?comments powered by Disqus