initial commit
This commit is contained in:
38
lab01/lab1.txt
Normal file
38
lab01/lab1.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
NOTE: For all assignments, you are not allowed to modify the type signatures of the functions.
|
||||
|
||||
If you do not have access to Canvas yet, please email me your solutions instead (thomas.austin@sjsu.edu).
|
||||
|
||||
Part 1)
|
||||
Navigate to http://codecheck.it/files/1801270115e7z5z5wxbxeqdep0nhqg29hic.
|
||||
Implement the maxNum function. This function reads in a list of numbers and returns the largest. Define this function in a recursive manner. (Note that using the max function is cheating).
|
||||
|
||||
Once you have passed all tests, click the "Download Report" button.
|
||||
|
||||
|
||||
Part 2)
|
||||
Implement the "fizzbuzz" game. The function counts from 1 to the specified number, returning a string with the result. The rules are:
|
||||
|
||||
If a number is divisible by 3 and by 5, instead say "fizzbuzz"
|
||||
Else if a number is divisible by 3, instead say "fizz"
|
||||
Else if a number is divisible by 5, instead say "buzz"
|
||||
Otherwise say the number
|
||||
|
||||
Here is a sample run of this function:
|
||||
|
||||
*Main> fizzbuzz 15
|
||||
"1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz"
|
||||
|
||||
Go to http://codecheck.it/files/1801222202d5zry2pb674sm51n6sc7ajplp to work on the problem.
|
||||
|
||||
|
||||
Part 3)
|
||||
Go to http://codecheck.it/files/1801270120a4iwu1xmznyiyliwjqj9akxcl.
|
||||
|
||||
In JSON.hs, implement the JObject case of the toString function.
|
||||
|
||||
|
||||
|
||||
SUBMITTING YOUR WORK
|
||||
|
||||
Once you have completed all three problems, you should have generated three different .zip files from CodeCheck. Zip those .zip files together, and upload the resulting .zip file to Canvas.
|
||||
|
||||
Reference in New Issue
Block a user