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.
In lecture where is problem set due. Look for links Instructions (PDF) Sample Solution (ZIP) Download Sample Solution, unzip it and enjoy.
Thanks Pedja. However, I'm not seeing in lecture 2. Perhaps there wasn't a solution given? I believe I have the right answer but just want to double check. For the next exercise I can see the solution in lecture 4.
Here ya go! http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/unit-1/lecture-6-recursion/ I haven't got that far but when i ran the sample solution it returned an error. lol who knows?
Phylosopher, there isn't any solution for Problem Set 0 because it is just setting up your environment. Problem Set 1 You can find both the problem and solution in Lecture 4 Machine Interpretation of a Program. Problem Set 2 you can find both the problem and sample solution in Lecture 6 Recursion. The problems and solutions are ALWAYS given on the same page and they page they're on is the lecture when they are due, not when they're assigned ... so you have to look ahead a few lectures to get both the problems and the answers you should be working on at any given point.
Hi Jesse... went through the file you recommended and couldn't find the solution to ps0. RoamingBlue, there was an exercise and I was just hoping to confirm that I did the exercise right (though it does work for me). From Problem Set #0 PDF "Write a program that does the following in order: Asks the user to enter his/her date of birth. Asks the user to enter his/her last name. Prints out the user’s last name and date of birth, in that order." Here is my response dob = raw_input('Enter your date of birth: ') lastname = raw_input('Enter your last name: ') print lastname print dob Thanks!
Mornin' Phylosopher, You're right, there's no solution set for Problem Set 0. What you have looks absolutely right though. Here's what I have for that one if you want something to compare to (though ours are darn near identical. # Problem Set 0 # Name: RoamingBlue # Collaborators: None # Time Spent: 0:05 dateOfBirth = raw_input('Enter your date of birth: ') lastName = raw_input('Enter your last name: ') print lastName print dateOfBirth
Thanks RoamingBlue... Do you know why we Capitalize the second work in a function e.g. lastName? Just curious.
@phylosopher Capitalization of every word in variable name exept thr first is just naming convention. It is much easier to read myVariableHasLotsWordsInHisName than myvariablehaslots... Same is with my_variable_has... It's best to consistent, use one in program that you write. Which one, it depends on your preferences or if you work in a team which convention team adopted.
@phylosopher @pedja is right. It's just a convention (one I personally like) for making your variables and code generally readable. There are several widespread conventions, it's best to pick one and stick with it. Camel case notation is the one I typically use. It involves capitalizing the first letter of every word like this: myCamelCaseVariable Hungarian notation takes this one step further, and would have you prepend the variable type is the first word like this: strMyHungarianVariable (str at the start for a variable that's a string Then there's a variety of conventions which separate words in variable names with undeerscores or dashes. The recommended convention for Python is: UpperCamelCase for class names, CAPITALIZED_WITH_UNDERSCORES for constants, and lowercase_separated_by_underscores for other names. Yeah, I'm not using the recommended notation for Python, but I'm just trying to run through the exercises quickly and camel case, for some reason, is just easier for me to read. There's a good overview of conventions for python here if you want some supplementary reading: http://www.python.org/dev/peps/pep-0008/#naming-conventions
You folks are awesome... big thanks!
I found several solutions by searching on google for "MIT OCW 6.00 problem set solutions". Some solutions are better than others.