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???
well did you enter a number and press enter?
yes, but python didn't ask my to keep enter the second and third raw_input
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?
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'?
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
are you just pasting that code into the python REPL?
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)
how do i execute it exactly?? through IDLE?
In the python shell. Go File, New window. then copy your code over, save it and then run the module
Join our real-time social learning platform and learn together with your friends!