Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 20 Online
OpenStudy (anonymous):

Looking for help in Psets starting at 9.

OpenStudy (anonymous):

working on that one as well. I've gotten past 1 and sorta finished 2. I don't see why we have to make a specific __iter__, because for me, I just have a list of objects, which can use the normal __iter__ to go through. Although I did run into an issue with the print for loop. For some reason, it'll print the list just fine, but it'll finish with an error that says it tried to iterate a "NoneType" Maybe we can help each other?

OpenStudy (anonymous):

I am going to go back a couple lectures to re-watch them (I am going to preform a sorting algorithm) looking for details I may have missed. It is to easy to find codes of these Psets so i am going to go back to make sure I understand the thinking so I can frame a problem and levels of abstraction. OOP is so important to understand!

OpenStudy (anonymous):

Also we could debug each others code. Sort of like exchanging a paper it helps to have second pair of eyes.

OpenStudy (anonymous):

Sounds good, I just finished the ps #9, but I'm lol absolutely sure there are better ways. I've attached the file.

OpenStudy (anonymous):

I cleaned out a couple syntax errors but was still not able to run it because I do not have the attached text directory. Give it a run on your end. Note: If attached this as a copy so if it doesn't work you can revert to the original you sent me.

OpenStudy (anonymous):

Note: Not sure what version you are running but I am using 3.2.2 where print('string') is a valid statement and print string or print 'string' are no longer valid. Oh man we live in a fast paced world.

OpenStudy (anonymous):

oh yeah, this only works on python 2.7 python 3.2 has a bunch of changes, but I'm gonna adopt it a bit later. The issue is that all the problem sets have code written in 2.7, so it's a pain to have to manually reedit them. Also it seems there a lot of extensions to python that only work on 2.7 You know you can install both 2.7 and 3.2 at the same time. I have this setup and works fine.

OpenStudy (anonymous):

I did and it did not run well. 3.2 kept crashing when I when into script mode. It only worked in interactive mode. So I dumped 2.7. I think the code should be updated anyway; this course is 4 yrs and 5 version old.

OpenStudy (anonymous):

Lol, well your in a bind cuz you'll need 2.7 to install wxpython and do ps#10. Installing wxpython is actually problem#1 That's pretty strange tho cuz mine works fine. We both use mac osx lion as well. Are you installing them to separate directorys? Cuz that's how i have it.

OpenStudy (anonymous):

I'm not sure if you've checked out my question about wxpython again. But you can get wxpython to work by installing python for Mac Tiger through Snow Leopard. If you installed python for Lion, it will most likely error.

OpenStudy (anonymous):

I am running Lion. I re-installed 3.2 and 2.7; both IDEs run fine. ?

OpenStudy (anonymous):

Yeah, they should be able to work side by side. Congrats =)

OpenStudy (anonymous):

I was able to run the posted hw9.py file just fine (Win7 64, python 2.7.2). Are either of you still having trouble? I'm almost done with PS12.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!