redundant programming = confused student?
Feb. 9th, 2006 04:34 am
Polymorphous Light Eruption.Put down the sun you
fool!
Which disease are you?
brought to you by Quizilla
You know what I hate? Just KNOWING that you're totally screwing something up:
;;; Step 3
(define base 11)
(define prime 99991)
; Fill your secret key in here
(define my-secret 1985)
; Procedure to compute public key from secret key
; Should return: (base ^ secret) mod prime
; Hint: Use the expmod function defined above.
(define (make-public base secret prime)
(expmod base my-secret prime)
)
(define my-public (make-public base secret prime))
They can't possibly want us to do something so... Redundant.
[EDIT: Yay! I finished lab two successfully! That bit of redundancy might get me docked on style, but the program works, so... But I just realized... I need to comment this thing... Ugh.]
So Close
Date: 2006-02-09 06:26 am (UTC)http://newjava.ytmnd.com/
Gongrats!
Re: So Close
Date: 2006-02-09 06:28 am (UTC)In case you think what I wrote is C++, it's actually Scheme, which is a dialect of LisP
Re: So Close
Date: 2006-02-09 06:34 am (UTC)sure .... I see it now.
Can you tell I have n03 (lu3?
Re: So Close
Date: 2006-02-09 11:28 am (UTC)no subject
Date: 2006-02-09 11:43 pm (UTC)BTW as you may have noticed, I've neglected the hell of LJ over the past year. As a result a bazillion people removed me from their friends list during that time (I'm sure mostly due to the fact that I rarely posted to my own and never commented on their LJs). But I've I've got 5 bazillion left. And I'd spend 24/7 on LJ if I tried to read them all.
So, I've decided to just use my friends list as a reference and read the LJs of people I want to keep up with via RSS feeds (http://www.livejournal.com/support/faqbrowse.bml?faqid=149). I use RSS feeds for everything these days.
Anyway, you're one of the lucky ones. Excited eh? I thought not. :-P (http://en.wikipedia.org/wiki/Rss_feeds) ()
no subject
Date: 2006-02-09 11:46 pm (UTC)