Date: 2010-01-17 01:52 am (UTC)
jetamors: Yoruichi is really hot (Default)
From: [personal profile] jetamors

Yes, that's correct. If it helps, here's a while loop that would give exactly the same result as my for loop:

i = 3
while (i < candidate/2):                      
    remaindercheck = remaindercheck * candidate%i
    i = i + 1


Let me know if you have any other questions or want me to explain something in a different way. It's so hard to explain math when we can't talk face to face >.<
This community only allows commenting by members. You may comment here if you're a member of intro_to_cs.
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

Introduction to Computer Science

July 2010

S M T W T F S
    123
45678910
11121314151617
18192021222324
2526272829 3031

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 16th, 2025 10:13 pm
Powered by Dreamwidth Studios