Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Extra practice assignment
- At various points in the LPTHW exercises, I'll add my own assignments.
- This is the first of these, to be completed after _Exercise 26_.
- After you turn in your working program, I'll look for possible improvements, and ask
- you to make some changes.
- #### Specifications
- Write a program that will produce verses of "Old MacDonald". It should work as follows:
- $ python oldmac.py duck quack
- Old MacDonald had a farm. E-I-E-I-O!
- And on that farm he had a duck. E-I-E-I-O!
- With a quack-quack here, quack-quack there, here a quack, there a quack, everywhere a quack, quack.
- Old MacDonald had a farm. E-I-E-I-O!
- Notice in particular that the verse produced will make use of the command line arguments passed in `sys.argv`.
- #### Things I'll look for
- The main goal at this point is to have well organized, readable code. Using functions would probably
- be good.
- #### Future ideas
- Some thoughts that would be challenging at this point:
- - How could we change a/an when necessary?
- - How could we do multiple verses with more arguments?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement