Tutorial 5: Lists and Sports Teams (October 10-12, 2007)This week's tutorial is the first to make use of unbounded data in Scheme (using lists). We will also be using some starter code (t5-starter.scm) for the first time. This should allow us to get a little more done by having some function and data definitions given beforehand. The material here comes from lecture module 5 of the course notes. Before beginning, examine the starter code given. The struct
Write a function Given a list of team names (strings), write a function Since we are only counting the number of wins and losses, we can completely describe the outcome of a game just by giving the name of the team that won and the name of the one that lost. So write a function We say a team has a winning record if its win percentage (as computed by the Write a function When two teams become entrenched in a bitter and long-standing rivalry, sometimes their fans care most about which team is doing better rather than their team's overall success. In order to assist such fans, write a function The following problem is a bit more complex than the previous ones, and will probably require at least one or two helper functions. So use the design recipe, think and plan carefully! Given a list of teams, we want to determine whether the teams could form a closed league --- that is, they have only played each other. Note that this is the case if and only if the following two conditions are met: So write a function Now that we've had a little over a month of CS 135, including assignments, tutorials, lectures, and an exam, you've probably formed some opinions about various aspects of the course. And it's still early enough that we might be able to change some things to help you learn better. So we'd like you all to take this little survey. You don't need give your name or any identifying information, and the survey is completely optional as well. In fact, this has NOT been cleared by the office of ethics, so if that makes you uncomfortable, please don't feel pressured to participate. But thanks very much for those who do choose to participate! We will read all of your responses, and if there is any particular issue that receives widespread attention, we may make some changes to address the concern. |
This file generated Monday, December 17th, 2007 using PLT Scheme and WebIt!