Every student should have signed up for a discussion and lab section. To copy these files to your lab account you can run the commands: Tree Recursion and Data Abstraction. Using your solution to Q5, write substitute2 that takes a list, a list of old words, and a list of new words; the last two lists should be the same length. Exceptions Video full 1pp 8pp Week 4 Class Material. Follow the instructions here to submit the electronic copy.
It should return a copy of the first argument, but with each word that occurs in the second argument replaced by the corresponding word of the third argument: Core Questions — Questions that we believe test a core concept of the course and should be your highest priority when attempting the homework. It should return a copy of the list, but with every occurrence of the old word replaced by the new word, even in sublists. Iterators Video full 1pp 8pp Week 6 Staff Resources.
You may assume that the input is either a stream nomework some unknown finite length, or contains a cycle. The solution is short fewer than 20 lines of codebut requires a clever idea.
Week 17 Class Material. Lost on the Moon. Objects Video full 1pp 8pp Week 7 Class Material.
Follow the instructions here to submit the electronic copy. If you have any questions about using Ok, please refer to this hmework. Iterators Video full 1pp 8pp Write the predicate ordered?
To turn in the electronic copysubmit all of your answers in files named hw You will need to make the following changes:.
Data Abstraction Video full 1pp 8pp Make sure to perform this operation even for items in sublists. However, these are questions that we consider either more difficult than what we would ask you on an exam or that focus on ideas we are not concerned with in this course, so please do not be discouraged if you do not solve them.
Homework 11 | CS 61A Fall
Cycles In Scheme, it’s possible to have a stream with cycles. Recursion Video full 1pp 8pp Final Review Slides Exam Prep Using STk, you can load and execute functions from this file with the commands assuming you’re in the same directory as hw If the item is not found, return f assume that a predicate will never match f. Week 3 Staff Resources.
Week 8 Staff Resources. Make sure to perform this operation even for items in sublists. Midterm 1 Review Exam Prep You might find the following references useful: Data Examples Video full 1pp 8pp Choose a method resolution order from the three approaches that have been used in Python since its invention.
Week 15 Class Material. Is it always possible to himework return f? It should return a copy of the first argument, but with each word that occurs in the second argument replaced by the corresponding word of the third argument:. You can use the predicate list?
Find Define a function find which takes in as input a stream and a predicate, and returns the first element in the stream satisfying the predicate.
CS61A Homework 11 Due by Week 10 Staff Resources. Week 5 Class Material. Try to discover the solution yourself before asking around: Check that you have successfully submitted your homeework on okpy.