Hi, fellow Python studiers. I've been hard at work solving problem set #2 for the 2008 version of 6.00. Based on what I've seen other people submitting, I feel I have the correct answers. Here is my code for part 4, which finds the largest non-solution integer to a Diophantine equation of xa+yb+zc=n where x, y, and z are integer coefficients. For example, equation 6a+9b+20c=n I have 43 as the largest integer without a solution. My biggest concern I have is making sure my for looping conditions are correct, as I haven't seen anyone else calculate the problem exactly like this: http://dpaste.com/1326796
comments in your code would help. your solution works - so your looping conditions must be correct. here is mine http://dpaste.com/1327950/
Thanks. I should have posted the code from the first problem set- it was better commented. For anyone interested, this code finds all solutions to 6a+9b+20c=n for a given n. It has code commenting. http://dpaste.com/1327972/
Join our real-time social learning platform and learn together with your friends!