Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
Hi all  is anyone currently working on Assignment 1: McDiophantine: Selling McNuggets?
I am working on it and would like to see if anyone has any input on how they would approach this (all parts).
Thanks,
please read down in the comments before posting.
 one year ago
 one year ago
Hi all  is anyone currently working on Assignment 1: McDiophantine: Selling McNuggets? I am working on it and would like to see if anyone has any input on how they would approach this (all parts). Thanks, please read down in the comments before posting.
 one year ago
 one year ago

This Question is Closed

ChapLeoBest ResponseYou've already chosen the best response.1
Problem 1 is the proving part. You can either write a program or use a pencil and paper. I did it in the latter method. Just list out the possibilities. For example; 6(0) + 9(6) + 20(0)= 54. Think of others like this one.
 one year ago

silentBest ResponseYou've already chosen the best response.0
do you know how to set up the code? the assignment my teacher gave me was to use "for loops" to prove if the combinations were possible but i keep getting stuck on just trying to set it up, i have written it down on paper and have tried to code it but i keep getting stuck.
 one year ago

ChapLeoBest ResponseYou've already chosen the best response.1
Don't know whether I can give you the direct answer since it's an assignment question, but here's a hint: you have to check each and every number combination possible. So you will need to use nested for..... loops. Does that help?
 one year ago

silentBest ResponseYou've already chosen the best response.0
what do you mean by nested? do you mean a "for loop" inside of a "for loop", because that is what i am currently doing but i am not sure what numbers i should be using in the for loops
 one year ago

ChapLeoBest ResponseYou've already chosen the best response.1
Yes! nested means a loop inside a loop. The number range is of your choice. Think wisely; the largest number is 55, right? So if you are creating a range for '6', it should be between 0 and 10, right? since 6 x 10 =60, which is above the range of our interest. think like that for 20 and 9 as well.
 one year ago

silentBest ResponseYou've already chosen the best response.0
I have this bit of code so far but i am unsure what i am doing wrong. int a, b, c, total; total = 55; for(a=1; a<total; a++) { for(b=1; b<total; b++) { for(c=1; c<total; c++) { System.out.println(a); System.out.println(b); System.out.println(c); can anyone help me?
 one year ago

TehmeerAliBest ResponseYou've already chosen the best response.0
You are using like Java. There is no a++ in Python. Python syntax is little bit different. I was doing same kind of mistake. However, I am stuck in first problem of problem set 1 that says get last module of 1000.
 one year ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.