Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Dodonga Group Title

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/zellers.py", line 10, in <module> W= (13*A-1)/5 TypeError: unsupported operand type(s) for -: 'str' and 'int' "

  • one year ago
  • one year ago

  • This Question is Closed
  1. michaelseyne Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    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 ?

    • one year ago
  2. Dodonga Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    thank you that was exactly it! i was using raw_input instead of int(input

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...


  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.