Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with a banking Program
#5
Hey guys thanks for all the help this is the finnished program

bal = float(0)

while 1==1:
  float(bal)
  play_int = input("please enter wtd for withdraw and enter dep for deposit or enter bal to see your balance or enter end to end the program: \n ")
  if play_int == "dep":
    while 1==1:
      try:
        dep = float(input("please enter the amount you would like to deposit: "))
        if dep < 0:
          print('\n please enter a positive number \n ')
          break
        bal = float(dep) + float(bal)
        print("you have deposited $"+ str(dep))
        print(f'{bal:.2f} \n')
        float(bal)
        break
      except ValueError:
        print(" you have entered a letter  or a decimal please enter a whole number \n")
  elif play_int == "wtd":
    while 1==1:
      try:
       wtd = float(input("please enter the amount you would like to withdraw : \n "))
       if wtd < 0:
          print("please enter a positive number \n ")
          break
       bal = float(bal) - float(wtd)
       print("you have withdrawn " +  str(wtd))
       print(f'{bal:.2f} \n')
       float(bal)
       break
      except ValueError:
       print("you have entered a letter or a decimal please enter a whole number \n ")
  elif play_int == "bal":
    str(bal)
    print(f'{bal:.2f}')
    float(bal)
  elif play_int == "end":
    print("ending program")
    print(".")
    print(".")
    print(".")
    print(".")
    print(".")
    print(".")
    print(".")
    print(".")
    print(".")
    print(".")
    print(".")
    print("program ended")
    break
  elif play_int == "crash":
    while 1==1:
      print("...................................................................................................................................................................")
~~ UwU
Reply


Messages In This Thread
Help with a banking Program - by CrazyMakes - Jan-14-2020, 10:20 PM
RE: Help with a banking Program - by joe_momma - Jan-14-2020, 11:42 PM
RE: Help with a banking Program - by buran - Jan-15-2020, 07:11 AM
RE: Help with a banking Program - by perfringo - Jan-15-2020, 07:55 AM
RE: Help with a banking Program - by CrazyMakes - Jan-20-2020, 12:36 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020