Quantcast

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

deerbane Group Title

Can anyone tell me what is wrong with this code? Why is there a syntax error with 'B > 0?' https://gist.github.com/anonymous/6115943

  • one year ago
  • one year ago

  • This Question is Open
  1. ultrapuggy Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    B >0?

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

    I'm sorry, I meant y > 0

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

    IN the first while statement.

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

    I usually put the condition in parenthesis

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

    Ah. Not a bad idea. I will do that and let you know.

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

    But you aren't really setting up your variables properly. I'm seeing a and y, which I'm not sure what they mean...I'd assign better variables so that we can troubleshoot better.

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

    Good call. I am going to go through and be more descriptive and then I'll get back to you.

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

    here it is with revisions. https://gist.github.com/anonymous/6116090

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

    Sorry, just a sec. I forgot to convert a couple variables.

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

    https://gist.github.com/anonymous/6116132

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

    I had a similar problem with the while loop and decided to just declare the variable before i started the loop. Keep at it it will all of a sudden come to you after you are so annoyed with it and it will look easy after that. I spent a major portion of my day/night yesterday conquering this vexing problem.

    • one year ago
  12. Hellvince Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    There's a bunch of issues, regarding loops but also variables names. You should fix your variables names before trying to fix loops. I posted a comment on your Gist

    • one year ago
  13. Hellvince Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Btw, i forked your gist file to show you some naming errors and provide some advices. However, your code still wont work as is, as there are issues regarding your loops and tests (ex: your "if" statement checks if remainder is > 0 while you are already in a "while" loop designed to be executed only if remainder is > 0...).

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

    You have not declared what "remainder" is before the while loop. You cannot perform a comparsion between remainder and 0 unless remainder has a value. Also, you do not have the right number of brackets here: "initialmonthlyballance = round(float(((annualrate /12)*outbal)+outbal, 2)"

    • one year ago
  15. bwCA Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    comments added http://dpaste.com/1324144/

    • 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...

23

  • 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.