Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

Hello! I just completed problem 3 on problem set 2. Can you guys look at my code to see if any areas to improvement? or your code to compare? n=1;Diophantine=();check=0 while (n<70): a=0;b=0;c=0;ans=() while (6*a+9*b+20*c

Computer Science
I got my questions answered at in under 10 minutes. Go to now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer


To see the expert answer you'll need to create a free account at Brainly

please use a code pasting site: - - - - - - paste your code there and post the link here. select Python syntax highlighting when u paste.
Thank you bwCA! here is the link:
i limited my for loop ranges to say n / 6 + 1 or 20 / 6 + 1. and added break statements after each for statement to break if the equation evaluated to > n

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

again, it's cool... might as well allow user to enter constants, and print entire solution you can see how much the break statements speed it up: try commenting them out of course, if you allow negative constants -5a + 6b -c = 17 the breaks will miss alot.
Thank you !!! Guys! I really appreciate your help!

Not the answer you are looking for?

Search for more explanations.

Ask your own question