August 2020
Beginner
440 pages
12h 2m
English
|
Few songs are as annoying as “99 Bottles of Beer on the Wall.” Hopefully you’ve never had to ride for hours in a van with middle school boys who like to sing this. I have. It’s a fairly simple song that we can write an algorithm to generate. This will give us an opportunity to play with counting up and down, formatting strings, and--new to this exercise--writing functions and tests for those functions! |
|
Our program will be called bottles.py and will take one option, -n or --num, which must be a positive int (the default will be 10). The program should print all the verses from --num ...
Read now
Unlock full access