Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Choose a project: a program that keeps the scores of a quiz game and shows who is winning. Write the first four steps of the method: the goal, the jobs, the data, and a small example with the expected answers worked out by hand.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Plan. Follow the first four steps of the eight.
add_points(scores, name, points): add points to a player (a new player starts at 0),leader(scores): the name of the player with the most points,ranking(scores): the players from the most points to the least.sorted.Check. Each job could be a function, and the example is the answer key.
Answer: The plan above.
Log in to join the discussion.
Loading…