<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 26, 2010, at 6:44 PM, Joe Burk wrote:</div><br><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0" style="position: static; z-index: auto; "><tbody><tr><td valign="top" style="font: inherit;">Does anyone know of a grade calculator written in scheme. I'm particularly looking for one that would include the assignments name, the total points the assignment is worth, and the weight of the assignment. <br><br>For example I'm looking for something that could do this:<br><br>(define assignment (make-assignment "Test #1" 30 10))<br><br>(assignment-name assignment) = "Test #1"<br>(assignment-out-of assignment) = 30<br>(assignment-weight assignment) = 10<br>(assignment? assignment) = #t<br><br></td></tr></tbody></table></blockquote><br></div><div><br></div><div>Do you mean this: </div><div><br></div><div><div>(define-struct assignment (name out-of weight))</div><div><br></div><div>(define assignment1 (make-assignment "Test #1" 30 10))</div><div><br></div><div>(assignment-name assignment1) = "Test #1"</div><div>(assignment-out-of assignment1) = 30</div><div>(assignment-weight assignment1) = 10</div><div>(assignment? assignment1) = #t</div><div><br></div><div>It works exactly along the lines you asked for. </div></div></body></html>