Hello everyone, I am currently working on ps1 and am trying to use raw_input for multiple variables. Here are the first few lines of my code. balance = float(raw_input('Enter oustanding balance: ')) annualIR = float(raw_input('Enter annual interest rate: ')) minMPR = float(input('Enter min monthly payment rate: ')) When I run the script, I can only input the first variable before the program suddenly stops. I've tried to use the Python tutorial to help me but I was still stuck w/ the same problem, even when I pasted the answer code into the Python shell. May someone please help?
Those three lines of code run fine for me.
When I run the three lines of code, I get the following >>> balance = float(raw_input('Enter oustanding balance: ')) annualIR = float(raw_input('Enter annual interest rate: ')) minMPR = float(input('Enter min monthly payment rate: ')) Enter oustanding balance: 4800 >>> The next line, which I think should be 'Enter annual interest rate,' does not appear, Instead, I get this ">>>." I'm not sure what the problem is.
If you are using idle and if you want to make a multi statement program, select New from the File Menu - the new window will be an editing window, the window with the >>> prompts is the shell and will execute each line as you enter it. In the editing window, if you want to run your program press F5 - be sure to save with a .py extension.
I was able to fix my procedural issue. Thank you, bwCA and eSpex, for your responses!
Join our real-time social learning platform and learn together with your friends!