• anonymous
Don't know what I'm doing wrong. Trying to get a feel for python, so I copied and pasted the barnyard code example from "4: Abstraction through Functions; Introduction to Recursion". I am doing exactly what the prof is doing, but when I type "barnYard" into the Python Shell, it tells me "NameError: name 'barnyard' is not defined" Now this is probably a simple error on my part, but for the life of me I can't see why I can't replicate the results in the classroom when it copied exactly (including the indentations). Does anybody here have any insight that might help me?
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert
Hey! We 've verified this expert answer for you, click below to unlock the details :)
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.
  • schrodinger
I got my questions answered at in under 10 minutes. Go to now for free help!
  • anonymous
Never mind this question. I think I figured it out =]

Looking for something else?

Not the answer you are looking for? Search for more explanations.