Approximate overview
Academic
Cultural
Peer
Wellness
Misc
You will have a number like 2.75 for your mini-project.
.99 is “everything is correct”.
.75 is “some tests failed”The graders have left comments.
You may resubmit your mini-project under the “MP1 Redo” assignment on Gradescope for zero tokens. (In the future, those with I’s will need to spend tokens.)
Resubmissions are due on Thursday Sept. 28.
#|
S. Tudent
CSC-151-01 2023Fa
MP1 Resubmit
The only thing I missed on the last assignment was ensuring that all of
my procedures took parameters. I added those.
|#
;;; (substring str start end) -> string?
;;; str : string?
;;; start : exact-integer? (<= 0 start (string-length str))
;;; end : exact-integer? (<= start end (string-length str))
;;; Extract the substring of `str` starting at index `start`
;;; (inclusive) and ending at index `end` (exclusive), using
;;; zero-based indexing.
start
and end.start and end should
be exact.I expected to see at least five tests.
More creative testers also explored …
Please make sure to give your tests reasonable names. “bound-grade” is not a good name. “number” is also not a good name.
Ask questions. It’s part of self gov. If you have questions, others likely do, too.
What is this “epsilon” thing?
When we’re comparing inexact numbers, we acknowledge that values may be a bit off. “epsilon” is how far we’re willing to have them off.
(test-= "NOTE" expression expected how-close)
I got different answers from the test-= tests with sqrt.
Let’s try them.
(test-= "sqrt 2 squared, approximately" 2 (* (sqrt 2) (sqrt 2)) 0.00001)
(test-= "sqrt 2 squared, exactly" 2 (* (sqrt 2) (sqrt 2)) 0)
Are you ever going to fix hsv->rgb?
I hope so.
It will be available immediately after class.
What are “related colors”?
You can decide. You should document.
Maybe five tints of the same shade.
Maybe three colors 120 degrees apart with two tints of each.
You could go for “what looks good together” (according to you, according to color theory)
You could go for “what clashes horribly”
Will you give us a filename?
Stay tuned.
For palindrome, I’d make sure to test