![]() | |
Project 3: Assigned: Fri Jan 24 2025 In this project, you will use recursion to write some Racket procedures. These exercises start on page 37 of the Scheme/Racket packet. If you don't remember your recursion steps, ask Kyle! Part 0, 0 points: Create a file named project3.rkt and put the racket header and a comment with your name at the top. All of your procedure definitions will go in that file. Make sure that you take out any read statements! (Unlike the last one.) At the bottom of your file, keep this statement: That will make sure your procedures can be imported by other files. (You have to do this in order for me to grade it.)Part 1, 30 points: Packet Exercise 9.5.1: fib . Here are some examples:> (fib 0)
0
> (fib 1)
1
> (fib 9)
34 Part 2, 25 points: Packet Exercise 9.5.2: sum:1toN . Here are some examples:> (sum:1toN 1)
1
> (sum:1toN 5)
15
> (sum:1toN 10)
55
> (sum:1toN 100)
5050 Part 3, 15 points: Packet Exercise 9.5.3: pascal . Here are some examples:> (pascal 0 0)
1
> (pascal 2 1)
2
> (pascal 4 2)
6
> (pascal 5 3)
10 Part 4, 20 points: Packet Exercise 9.5.11: first-greater . (Yes, I recommend skipping down to this one.) Here are some examples:> (first-greater 3 '(2 2 -4 10 12 5 0))
10
> (first-greater 10 '(10 10 11 12))
11 Part 5, 10 points: Packet Exercise 9.5.10: all-greater . Here are some examples:> (all-greater 3 '(2 2 -4 10 12 0 5 0))
(10 12 5)
> (all-greater 10 '(10 10 11 12))
(11 12) (5 of the points are bonus.)Submitting your Project: Choose a team name consisting of alphabetical characters. Put your file in a folder named <teamName>Project3, zip up the folder, and upload it to Canvas. Please make sure you name your folder correctly first, then zip it up, not the other way around. (You will have to resubmit if you don't do this.) If you submit early enough, let me know so I can test your code and give you a score. If you submit after the deadline please let me know right away so I can give you a grade. |