Welcome To Florida Sign
CSC 4640: Programming Languages
(Spring 2025)

Syllabus

LMS

Teachers


Assignments


Other Pages

Project 0:
Simple Procedures


Assigned: Wed Jan 08 2025
Due: 11:59:00 PM on Fri Jan 17 2025
Team Size: 1
Language: Racket
Out of: 5 points


In this project, you will write some simple Racket procedures from the Scheme/Racket packet by Wes Huang. (They start on page 11.)

Part 0, 0 points:

Create a file named project0.rkt. Add the racket header and your name in a comment at the top. All of your procedure definitions will go in that file.
#lang racket
;Project 0 procedures by <Your Name>.

Part 1, 1 points:

Exercise 4.6.4: ny-sales-tax. Here are some examples:
> (ny-sales-tax 1)
.0825
> (ny-sales-tax 100)
8.25

Part 2, 1 points:

Exercise 4.6.5: fahrenheit->celsius. (Yes, there's a typo in the description.) Here are some examples:
> (fahrenheit->celsius 32)
0
> (fahrenheit->celsius -40)
-40

Part 3, 1 points:

Exercise 4.6.6: hypotenuse. Here are some examples:
> (hypotenuse 3 4)
5.0
> (hypotenuse 10 20)
22.360679774997898

Part 4, 1 points:

Exercise 4.6.7: lowest-tax. This one uses two different scenarios for taxation. If it doesn't make sense to you, please ask me what it means. Here are some examples:
> (lowest-tax 30000)
1500.0
> (lowest-tax 100000)
10320.0

Part 5, 1 points:

Exercise 4.6.8: logb. Here are some examples:
> (logb 10000 100)
2.0
> (logb 243 3)
5.0

Part 6, 0 points:

In order to make your procedures readable by other files, you need to tell the code that they are available to be used by using the provide procedure. In order to make everything available, add this line to the end of your file:
(provide (all-defined-out))

Submitting your Project: Choose a team name consisting of alphabetical characters. Put your file in a folder named <teamName>Project0, 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.