A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • one year ago

i have question about the first hw (sorry, new beginner here): i have these raw_input: balance = float(raw_input("Enter the outstanding balance on your credit card: ")) annualInterestRate = float(raw_input("Enter the annual credit card interest rate as a decimal: ")) minMonthlyPaymentRate = float(raw_input("Enter the minimum monthly payment rate as a decimal: ")) but when i test it, python only shows the first "Enter the outstanding balance on your credit card:" why python didn't ask me other two???

  • This Question is Open
  1. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    well did you enter a number and press enter?

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

    yes, but python didn't ask my to keep enter the second and third raw_input

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

    hmm, you might be entering the wrong input. rawinput takes a string and float() converts that to a number. So does the program crash after that first raw input? or does it end successfully? is there an error message?

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

    the program do nothing and stand still after i type in the input. let's say i want put 5000 in first BALANCE, should I type 5000 only, or '5000'?

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

    here is my file. please take a look. After I type in 5000 it didn't move on to ask me the second and third raw_input

    1 Attachment
  6. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    are you just pasting that code into the python REPL?

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

    you should save it to a file and execute using: python creditcard.py also you need to be careful with the consistency of your names (totalAmtpaid vs totalAmtPaid)

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

    how do i execute it exactly?? through IDLE?

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

    In the python shell. Go File, New window. then copy your code over, save it and then run the module

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

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

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.