Python Help!!!! - Sajha Mobile
SAJHA MOBILE
Python Help!!!!
Posts 3 · Viewed 3797 · 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 1 · Viewed 24
· Posts 4 · Viewed 366
· Posts 180 · Viewed 60894 · Likes 44
· Posts 7 · Viewed 1095
· Posts 1 · Viewed 117
· Posts 1 · Viewed 126
· Posts 1 · Viewed 378
· Posts 9 · Viewed 7081 · Likes 2
· Posts 1 · Viewed 196
· Posts 3 · Viewed 986



Travel Partners
Travel House Nepal