|CS 220 01/ Zelle||Winter 2018|
Chapter 1 Review Questions (pt 1) (due 1/8, class time)
Do T/F questions 1--5 and Multiple Choice 1--3 from pp 33,34. Write answers on paper suitable for hand-in at the start of class.
statistics functions (due 1/10, class time)
Write the Python functions in stats.py as specified on page 15. You can get the initial code from the "textbook resources" section of our homepage. Be prepared to share your solutions with the class. If you are doing this on your computer, it would be good to test your code :-).
Blackjack Function Specifications (due 1/12, class time)
Write specifications for the 6 helper functions of the Blackjack simulation that we discussed at the very end of class today. I think the 6 helpers are: printIntro, simNHands, printReport, simHand, dealCard, and handTotal. Your specifications should be in the same form as the stats.py (page 15).
The starting point is to take the structure chart that I drew on the board and figure out information flow. That is, determine what parameters have to be passed in order for each function to do its job. Then write the function headings with parameter names. Finally, provide approriate pre and post conditions that state what the function does. NOTE: You should not write the code (implementation) for these functions, just the specifications (function headings with pre and post conditions). Try to make your specifications as precise, concise, and complete as you can. You should be able to hand them off to another class member to (potentially) implement.
Blackjack Simulation (due 1/17, midnight)
OK, now you are supposed to write the code :-). The design we have so far is in blackjack.py. You should try to be faithful to it. Make sure to add appropriate pre and post conditions where they are currently lacking. Hand it in on Socrates.
Do T/F questions 6--10 and Multiple Choice 4--10 from pp 33,34. Write answers on paper suitable for hand-in at the start of class.