5 questions, points for each question will be indicated
all Pyret, no Python
sample questions shared as a PDF in Campuswire and provided as today's handout
problems we worked in class shared in CPO
here
Problem 1. Step-by-step development of a non-recursive function that takes a list of numbers, and uses an anonymous function and a built-in list function in its body (like Problem 5 on the practice exam)
Problem 2. Expressions involving built-in list functions. (like Problem 6 on the practice exam)
Problem 3. Given a recursive data definition (like Problem 2–The Cat in the Hat–on the practice exam), make examples, write a template, and a function.
Problem 4. List of structured data. (like Problem 4 from the practice exam)
Problem 5. Given a data definition for a Tree, and the diagram of a tree (like Problem 7 on the practice exam):
translate the tree diagram into its Pyret representation
design a function that takes a Tree, including all the parts a function should contain.