Rustic Solutions


Here are my solutions.  I don’t have any comments yet, but I thought I’d at least post once to see how this all works.  I have very little experience with programming, so my solutions aren’t particularly sophisticated.  Please let me know if I do something horribly wrong…

These gave me the right answers when I ran them with Python, but I might have distorted things when I posted them.  The spacing and indentation have changed.


while a< 1000:      if a%3==0 or a%5==0:      b=a+b a=a+1 print b [/sourcecode] [sourcecode language='python'] a,b,s=0,1,0 while a< 4000000:      if a%2==0:      s=s+a a,b=b,a+b print s [/sourcecode]


Tags: ,

One Response to “Rustic Solutions”

  1. sumidiot Says:

    Looks good to me (besides the indenting thing, which is a shame). I haven’t done the second problem yet, but I take it it deals with Fibonacci numbers, so I’m excited to tackle it.

    Just in terms of keeping everybody’s solutions organized a little, it might be convenient if you tag your post. When you are in the post editor, on the right-hand side there is a place to enter tags, or choose from already existing tags.

    But anyway, looks like we’re off to a good start!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: