What is Python, What is Python Programming language, Why Python, What is Python used for, Python 3.10.0, 10 reason why should you learn Python, Why Python is best for beginner in programming, Learn Python for free
ATM Using Python
Hey guys, hope you enjoyed this video and knew something about that how make ATM using Python . Then make sure to hit the like and subscribe button and also share this video to your friends and family so that they can also get some knowledge about this.
If you have any doubt about Python basics then comment me, I will surely make a tutorial on it :)
If you have any doubt then feel free to ask :)
Video's Link
Source Code
import time
print("Welcome to the Crazy Coding Bank ")
time.sleep(1)
print("Please enter your atm card")
time.sleep(1)
print("You have succesfully entered your atm card")
time.sleep(1)
user_balance = 500
password = 0000
pin = int(input("Enter your pin:\n"))
if pin == password :
print("You have successfully entered your pin")
while True:
print("""
1 == Check Balance
2 == Withdraw Money
3 == Deposit Money
4 == Quit
""")
try :
user = int(input("Enter your choice: \n"))
except:
print("Please enter a valid option ")
if user == 1 :
print(f"Your balance is {user_balance}")
if user == 2:
withdraw = int(input("How much amount do you want to withdraw"))
user_balance = user_balance - withdraw
print(f"{withdraw} is withdrawn from account")
print(f"Your balance is {user_balance}")
if user == 3:
deposit = int(input("How much money do you want to deposit:\n"))
user_balance = user_balance + deposit
print(f"{deposit} is deposit from account")
print(f"Your balance is {user_balance}")
if user == 4 :
break
else:
print("You have entered wrong pin")
Comments
Post a Comment