Lecture 5: The table method
This assignment is due on Sunday, January 23 at 11:59pm. Submit it using Handin as assignment lecture5.
1 Who can define the bigger number?
Exercise 1. Use this invite link to join Hypothesis, a service that lets us talk to each other as we read. Go to your settings and edit your profile so that your “display name” is the same name that you have been using in this course.
When you follow the link above with your browser, you should see Aaronson’s article, as well as a button “<” in the upper-right corner. Use the “<” button to expand the annotation sidebar.
You may need to log in to Hypothesis, using the account you created in Exercise 1.
Expand the drop-down menu “Public” in the sidebar, and change it to our course group “211”. You belong to this group because you used the invite link in Exercise 1. If you don’t post to this group, then other students won’t see your annotations, and you won’t get credit.
- Find two places in the article where you were confused, uncertain, or curious. Carefully select exactly the relevant passages, and Annotate them with your questions.
Make your question clear, descriptive, and specific.
Don’t be too brief, terse, or vague. Don’t just say “What’s this” or “I don’t understand”.
Don’t just summarize.
Once you have added your questions, respond to someone else.
Don’t bullshit.
(* 1234567898765432345678765434567654565 1234567898765432345678765434567654565)
2 Parentheses
(place-image (scale 2 bicycle horizontal-position 150 (empty-scene 300 300)) |
- At the market, I bought an apple for $1 and a sandwich for $5. What is the total that I spent? The answer to this problem is (+ 1 5), so put this in your Definitions Window:
At the market, I bought an apple for $1 and a sandwich for $5. Because a sandwich is a prepared food item, it is taxed 7%. What is the total that I spent? Define a constant named part2 with your formula.
At the market, I bought a baked apple for $1 and a sandwich for $5. Because both are prepared food items, both are taxed 7%. What is the total that I spent? Define a constant named part3 with your formula.
At the restaurant, I ordered a baked apple for $1 and a sandwich for $5. Both are taxed 7%, and I also decided to pay 20% tip on the amount before tax was added. The tip is not taxed. What is the total that I spent? Define a constant named part4 with your formula.
At the restaurant, I ordered a baked apple for $1 and a sandwich for $5. Both are taxed 7%, and I also decided to pay 20% tip on the amount after tax was added. What is the total that I spent? Define a constant named part5 with your formula.
Like the last probem, but what if I rounded up the final amount to the nearest dollar (using the ceiling function)? Define a constant named part6 with your formula.
3 The table method
Exercise 6. Use the table method to design a function ctof that converts a temperature in Celsius to a temperature in Fahrenheit. Submit your table as a screenshot, a photo, or a comment.