really need help calculating a monthly checking account fee | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

really need help calculating a monthly checking account fee

I need a code that Input includes an account balance and the number of times the account was overdrawn. The output is the fee, which is 1 percent of the balance minus 5 dollars for each time the account was overdrawn. Use three modules. The main program declares global variables and calls housekeeping, detail, and end-of-job modules. The housekeeping module prompts for and accepts a balances. The detail module prompts for and accepts the number of overdrafts, computes the fee, and displays the result. this is the best i could come up with but im not getting right input everytime i input a number a = int(input("Balance \n" )) * (0.1) b = int(input("Over Draft ")) if (b>0): print(a - 5) else: print (a) print("Thanks for using this program")

7th Sep 2020, 12:07 PM
Jah Revelo
Jah Revelo - avatar
4 Answers
+ 3
Please write the code in the code playground and provide the link The playground supports the multiple inputs, but you must type each from a new line (tap "enter" button after single input)
7th Sep 2020, 12:17 PM
Tato
Tato - avatar
+ 3
Balance * 0.1 gives you 10% of balance. To get 1% do balance * 0.01 instead.
7th Sep 2020, 12:42 PM
Ipang
+ 1
if(b>0): print(a-5)*b if I understood the question right Edit:thanks Ipang didn't noticed that ,another correction as suggested by Ipang
7th Sep 2020, 12:31 PM
Abhay
Abhay - avatar
0
https://code.sololearn.com/csirIpLW2uWb/#py I have pasted a link to my code in the code playground i adjusted my code based on the comment section but every input i get -0.0?
7th Sep 2020, 3:56 PM
Jah Revelo
Jah Revelo - avatar