elz: (ada-tubes)
elz ([personal profile] elz) wrote in [community profile] intro_to_cs2009-11-11 05:21 pm
Entry tags:

Lecture 2







Problem set 1: Computing prime numbers, product of primes

This one's a little trickier, so feel free to comment if you run into any problems or want to brainstorm with other people!

(eta: having issues with poll, alas)
gchick: Small furry animal wearing a tin-foil hat (Default)

[personal profile] gchick 2009-11-12 04:30 am (UTC)(link)
Of course, if you believe, as all right-thinking people must, that ticky box is ALWAYS ticky, it's an infinite loop. But who am I to resist?

[personal profile] ex_wicker969 2009-11-12 05:06 am (UTC)(link)
Hey, I'm all for being a bit of a smartass. I realized I misread the question so I'm going back through all the Python Programming Wikibook examples, which led to this:

question = "Which prime do you wish to find?"
print (question)
n = raw_input()
print ("You wish to find the " + n + "th prime? Fat chance of THAT!"

aqgHeNVyWCUz

(Anonymous) 2012-01-07 05:23 am (UTC)(link)
I rekcon you are quite dead on with that.