Project Code
Project Code
import re
class SBIBank:
def _init_(self):
self.accounts = {}
print(text.center(width))
def main_menu(self):
if choice == 'A':
self.create_account()
elif choice == 'B':
self.proceed_existent_account()
self.proceed_atm()
else:
def create_account(self):
# CIF header
account_data = {}
today_date = datetime.now().strftime("%d/%m/%Y")
account_data['Date'] = today_date
# User input
account_data['Name'] = input("Enter your name: ")
# Gender validation
while True:
break
else:
while True:
try:
today = datetime.now()
# Calculate age considering whether the birthday has passed this year
break
else:
print(f"You must be at least 18 years old to open an account. Your current age is {age}.")
except ValueError:
while True:
break
else:
# Nationality validation
while True:
if account_data['Nationality'] == 'Others':
break
break
else:
account_data['Occupation Type'] = input("Enter your occupation (State Govt / Central Govt / Public
Sector / Defence / Pvt. Sector): ")
while True:
try:
break
else:
except ValueError:
while True:
if re.match(r'^\d{10}$', mobile):
break
else:
while True:
break
else:
while True:
if re.match(r'^\d{10}$', nom_mobile):
break
else:
account_data['Verification Proof'] = input("Enter your verification proof (Aadhaar Card / PAN Card /
etc.): ")
# Save account
print(f"{key}: {value}")
print("\nAfter the creation of the account, you will get a bank Pass Book in 72 hours.")
def proceed_existent_account(self):
print("\nProceeding in existing account... (Feature not yet implemented)")
def proceed_atm(self):
if _name_ == "_main_":
sbi_bank = SBIBank()
sbi_bank.main_menu()