Hey, can somebody explain to my silly brains why this syntax error is occurring. (I know I misspelled iterator.) I think I just need fresh eyes on it. http://codepad.org/0kbu0XzP
You spelled For with a capital letter. Your print strings down the bottom have wrongly used quotes. a, b, c are not defined also, since you didn't start them prior to the while loop. Why are your loops of the form 'while a == something'? Did you mean 'while a <= something'? And now codepad is giving me 500 so I can't see your code :-(
Also, avoid using iter as a variable name. It's a keyword in Python :-)
Thank you very much. I should have seen a lot of that. I have just been kind of beating my head against it for a while. This is not the first time I have tried to write this code...
I feel like I am very close. I don't have any errors now, but it also doesn't output. I am sorry to be such a drag, but any hints would be great... http://codepad.org/HNytfcOB
i'm not sure what you are trying to do in line 16 but iter is a built-in function and it probably isn't a good idea to make it point to 0. you are close, can you explain in words what your function is doing?
To be perfectly honest, not really. I have read a thing or two about the "def" function, but an actual, syntactically correct english description eludes me. This is probably weird for you, but could YOU describe it to me?
do you understand how nested for loops work?
Yeah, I get that I am traversing the range that I input and am making it conditional. Am I missing something that I need to go back and read about?
your function requires an argument - num - but you don't use it. you want to cycle through All the combinations of a,b,c before you decide that n cannot be bought. putting print statements in your code can help with debugging http://codepad.org/xbnjlOEX take a look at the output - is that what you intended?
Thanks. I am going to poke around and figure out what num does, then rewrite my stuff and repost it.
Alright. I have been looking around and I can't find an explanation of what num does.
num is the variable you defined as the input to the function. If you don't use it within the function, it doesn't do anything.
Okay, so even though assignment one is due at class three, the reading for four is really helpful.
Found the information seleneyue was trying to impart. IN 3.6.
I UNDERSTAND NOW!
Join our real-time social learning platform and learn together with your friends!