Python Help!!!! - Sajha Mobile
SAJHA MOBILE
Python Help!!!!
Posts 3 · Viewed 5067 · Go to Last Post
pythoner
· Snapshot 0
Like · Likedby · 0
 I'm trying to write atm code on Python.Here is the question.

The atm only dispense amount divisible by 5.The fee for each withdrawal is $0.5+1% of the amount cash withdrawn. After completing each transaction the bank rounds the balance to the closest whole value 67.9=67 ,78.1=78.

Input the list of integers, the first one denotes account balance the second is a list of money anmount to withdraw.
Output :account balance after all operations,Integer.

please give some hints ,suggestions..........
Any python gurus in sajha. Help will be appreciated.

 

Last edited: 02-Apr-13 05:10 PM
alece
· Snapshot 156
Like · Liked by · 0
initialBalance = float (input('Enter the initial amount:'))

balanceToWithDraw = float (input("Enter the amount you want to withdraw"))

atmCharge = float (1/100* balanceToWithDraw + 0.05)
print ("The amount you have been charged was->")
print (atmCharge)

remainingBalance = float(initialBalance-(balanceToWithDraw + atmCharge))
print ("The remaining balance in your account is")
print ("Since we dont want to see any decimal numbers your remaining balance is::")
print (int(remainingBalance))
alece
· Snapshot 157
Like · Liked by · 0
this shud get you started i think...
i dont know if its correct...
i did not check it yet.. i wish windows machines came with ruby and python pre-installed.
let me know if u get errors/...
Last edited: 02-Apr-13 09:30 PM
Please log in to reply to this post

You can also log in using your Facebook
View in Desktop
What people are reading
You might like these other discussions...
· Posts 16 · Viewed 4372 · Likes 3
· Posts 1 · Viewed 1182 · Likes 3
· Posts 1 · Viewed 936 · Likes 3
· Posts 8 · Viewed 2524 · Likes 3
· Posts 1 · Viewed 973
· Posts 12 · Viewed 3200
· Posts 1 · Viewed 788
· Posts 8 · Viewed 2025
· Posts 19 · Viewed 2364
· Posts 1 · Viewed 944



Travel Partners
Travel House Nepal