• anonymous
Hey, i'm doing the optional exercises of hw1 of 6.189 ( A gentle Intro to programming with python) OPT.1 Zeller's Algorithm: I'm getting the following error when inputing X Y W Z: " Traceback (most recent call last): File "C:/Python26/MIT Homework/", line 10, in W= (13*A-1)/5 TypeError: unsupported operand type(s) for -: 'str' and 'int' "
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
  • chestercat
See more answers at
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.

Get this expert

answer on brainly


Get your free account and access expert answers to this
and thousands of other questions

  • anonymous
There is a problem with the value type I believe. check with : W = (13 * int(A) - 1)/5 the function int() change a string into an integer. Can you show your code if you still have an issue ?
  • anonymous
thank you that was exactly it! i was using raw_input instead of int(input

Looking for something else?

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