<jupyter_start><jupyter_text>Project 3. Proposal of simple ATM/Paypal screen.


Within the era of technology Automation of e-payments is a crucial part.
There is a lot of transactional data that is collected today. This data can be used to arrive at and to display personalised payment options to customers, based on their payment history and other demographic details. Some existing implementations in this space are:
Most online retailers store the customers’ most selected payment method and the payment instrument details (e.g a credit card) where permissible. This enables quick and easy payments via mobile apps and ecommerce websites.
Those processes are aided by various big data technologies and cloud solutions.<jupyter_code>data = {10011 : {'name': 'Iliana', 
                      'address': 'Z78, CF Complex, Sector-14, Vashi', 
                      'phone num': '5469871230',
                      'govt id': 'QK44758',
                      'amount': 16400}}
data = {10012 : {'name': 'Chris', 
                      'address': 'C42, MG Complex, Sector-14, Vashi', 
                      'phone num': '4545454545',
                      'govt id': 'S54321Z',
                      'amount': 16400}, 
            100013 : {'name' : 'Tom', 
                      'address': 'Z-280, Vakhou Modi, Lohagou', 
                      'phone num' : '5454545454',
                      'govt id': 'XZ45666',
                      'amount': 14999}}
# Create the 'data' dictionary and the 'new_user_attributes' list.
data = {}
new_user_attributes = ['name', 'address', 'phone num', 'govt id', 'amount']
# Create the 'new_user()' function to add a new user to the 'cust_data' dictionary. 
from random import randint

def new_user():
  """this function add a new user to the 'cust_data'"""

  acc_no = str(randint(10000, 99999))
  new_user_input = []
  
  for i in range(len(new_user_attributes)):
    new_user_input.append(input(f"enter your {new_user_attributes[i]} : "))

  new_user_details = {k : v for k,v in zip(new_user_attributes, new_user_input)}
  data[acc_no] = new_user_details

  print(f"\nYour details are added successfully.\
        \nYour account number is {acc_no}\
        \nPlease don't lose it.")
# Create the 'existing_user()' function to get the account details of an existing user from the 'data' dictionary.
def existing_user():
  """This function get the account details of an existing user from the 'data' dictionary"""

  vaild_option = ["1", "2", "3"]

  user_acc = input("Please enter your correct account number:")

  while user_acc not in data.keys():
    print(f"Not found.\n{user_acc}")
  
  details = data[user_acc]

  available_amount = details['amount']
  available_amount = int(available_amount)

  user_input = input(f"Welcome, {details['name']} !\
                          \nPlease Enter 1 to check your balance.\
                          \nPlease Enter 2 to withdraw an amount.\
                          \nPlease Enter 3 to deposit an amount.")

  while user_input not in vaild_option:
    print(f"Invalid input!\n{user_input}")

  if user_input == "1":
    print(f"\nyour account balance is {available_amount}")

  elif user_input == "2":
    w_amount = int(input("Enter the amount to be withdrawn:"))

    if w_amount > available_amount:
      print(f"Insufficient balance.\nAvailable balance: {available_amount}")

    else:
      available_amount -= w_amount
      print(f"Withdrawal successful.\nAvailable Balance: {available_amount}")

  elif user_input == "3":
    d_amount = int(input("Enter the to be deposite"))
    available_amount += d_amount
    print(f"Deposit successful.\nAvailable Balance: {available_amount}")
# Create an infinite while loop to run the application.
def app():
  """This function run the application"""

  last_lines = "\nThank you, for choosing our Bank!"

  while True:
    valid_inputs = ['1', '2', '3']

    print("Welcome to the ILI Bank!")
    print()

    option = input("\nEnter 1 if you are a new customer.\
                    \nEnter 2 if you are an existing customer.\
                    \nEnter 3 to terminate the application.\n")

    while option not in valid_inputs:
      print("\nInvalid input!")
      print(option)

    if option == "1":
      new_user()
      print(last_lines)
      break

    elif option == "2":
      existing_user()
      print(last_lines)
      break

    elif option == "3":
      print(last_lines)
      break

app()<jupyter_output>Welcome to the ILI Bank!


Enter 1 if you are a new customer.                    
Enter 2 if you are an existing customer.                    
Enter 3 to terminate the application.
1
enter your name : Test
enter your address : Test
enter your phone num : 5454545454
enter your govt id : 6547893
enter your amount : 10000

Your details are added successfully.        
Your account number is 64771        
Please don't lose it.

Thank you, for choosing our Bank!
{'fraction_non_alphanumeric': 0.09741035856573706, 'fraction_numerical': 0.029282868525896413, 'mean_word_length': 2.477146814404432, 'pattern_counts': {'":': 6, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '546747', 'license': 'MIT', 'n_tokens_mistral': 1585, 'n_tokens_neox': 1373, 'n_words': 526, 'path': 'Banking_Application_in_Python.ipynb', 'repo_name': 'Ipal23/E-payment-Application', 'size': '5020'}