anonymous
  • anonymous
I can't even get past the first problem set. I try to set raw_input variables to input the credit card data, and then I set additional variables that take that data and do the mathematical operations. After that I do a for loop until 12. I know I am doing something gravely wrong, and I need someone who is better at this to help give me a basic structure of a program.
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
e.mccormick
  • e.mccormick
Why not post what you have so we can help find and fix the errors?
rsmith6559
  • rsmith6559
Just a guess, but: raw_input() returns character data. If you want numbers, like an interest rate, you'd need to: interestRate = float( raw_input( "Enter interest rate: " ) ) if( interestRate > 1.0 ): interestRate = interestRate / 100.0
anonymous
  • anonymous
Excuse me for not being clearer earlier, I was not certain of this format has a character limit or anything. At any rate, I will post what code I have, and yes, I am aware this is terribly wrong. It's also not complete. outstanding_balance=raw_input("What is your outstanding balance?") annual_interest=raw_input("What is your annual interest rate?") min_monthly=raw_input("What is the minimum monthly repayment rate?") mmp = min_monthly * outstanding balance pp = mmp - anaual_interest/12 * outstanding_balance rb = outstanding_balance - pp year=(1,2,3,4,5,6,7,8,9,10,11,12) for months in year: print month print print My thinking was using a for loop to cycle through the 12 months, and then at every iteration (1 month), print out the variables which would take the input data and calculate it.

Looking for something else?

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

More answers

e.mccormick
  • e.mccormick
Well, what rsmith pointed out is an issue. `outstanding_balance=raw_input("What is your outstanding balance?")` That takes in TEXT. Computers see the text 10 and the number 10 differently. So you need to change it from text to numbers. `outstanding_balance=float(raw_input("What is your outstanding balance? "))` That would change is to a floating point number. int() would change it into a signed integer. The floats allow for decimals, so they help with things like interest, but are not super accurate. Binary representations of decimals end up with rounding issues. Integers, on the other hand, are wonderfully precise... but in computers you can't easily leave things in fractional form. They want 3/2 = 1, not 1.5, in computers thanks to how integers work. So you probably want floats here.

Looking for something else?

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