Biplove Python Documentation
Biplove Python Documentation
Intake code:
Introduction
The objective of this assessment was to make a solitary Python application that both bank customers and
executives could use to oversee credits. There are various modules for each part, every one of which is
comprised of express request lines and factors. It's likewise conceivable to make a set aside book record that
isn't indistinguishable from another part. As a controller, the regulator communicates with all chronicles, has
the position to endorse new selections and update records like data, just as give express credit IDs to buyers.
The customer, then again, would approach an assortment of different passageways and parts from the chairman.
Customers are likewise partitioned into two classes: "Selected" and "Unregistered." Individually, these two
sorts of customer bunches have more modest, more particular segments. Enlisted purchasers have an
exceptional affirmation technique that expects them to tap on their login certifications to get to the customer
entryway. This assignment was made to fulfill this large number of rules.
Suppositions
i. Create a login structure for the manager and customer regions, each with its own plan of login
methodology that will recognize the username and mystery word. The customer may have the choice to get to
their specific doorway if their accreditations are entered precisely.
ii. Create text records dependent on the requirement for different employments. For instance, one
substance archive will be doled out to record the customer's very own data, while another will be appointed to
store the credit data.
iii. Create different variables, each with its own original name.
iv. Each part was tried during the coding association, and records will be saved for future reference to stay
away from issues reoccurring all through future turn of events.
v. The customer will be actuated to enter their home advance aggregate, credit residency, and financing
cost, after which the development advance adding machine will uncover the month to month total due.
Welcome to the Malaysia Bank Online Loan Management System (MBOLMS) application structure. Here, you
can get all the data about the advances, portion and the reimbursement cycle. You can sign into the site and
follow your bank exchanges, and ask about the portion dates it likewise works with the director to look into
client information and provide orders for endorsement and dismissal and making the entirety of this in an
improved on manner through python coding.
Assumption:
2. I expect new client/old client can login or enlist utilizing id and secret key
3. I accept administrator can handle every one of the customers information, ask for and can endorse or
dismiss it
4. I expect clients can survey the credit application he applied by him/her
5. I accept the client can follow their exchange and the endorsement made by administrator in regards to
the credit
6. I accept the client can ascertain the portion about the advance he/she needs and its time span
7. I expect that clients can enroll on the site by utilizing/making new ID, secret word, email, contact
number and , date of birth (DOB)
8. I accept clients can see rundown of credits to pick the appropriate one
9. I expect that the client and administrator can without much of a stretch control the framework by
enrolling or from the principle menu
Pseudocode
# Biplove Mainali
# NP000572
IMPORT sys
IMPORT re
IMPORT datetime
IMPORT calendar
IMPORT sys
IMPORT tabulate
# ****************************************************
SET data_list TO []
RETURN data_list
# Admin Login
WHILE True:
OUTPUT(admin_list)
SET flag TO 0
OUTPUT(c_data[0], c_data[1])
SET flag TO 1
IF flag:
all_admin_functions()
ELSE:
# Admin menu
OUTPUT("""\n
3. View Transactions
4. Go to Main Menu
\n""")
TRY:
EXCEPT:
all_admin_functions()
ELSE:
IF ch EQUALS 1:
SET verify_req TO INPUT("\nDo you want to verify user request (y/n) ? ")
IF verify_customers(username):
verify_customer_request()
all_admin_functions()
verify_customer_request()
ELSEIF ch EQUALS 2:
DEFINE FUNCTION verify_loan_request(): # providing unique loan id and verifying loan requests
view_unverified_loan()
SET verify_loan TO INPUT("\nDo you want to verify user loans (y/n) ?")
IF verify_user_loan_id(
loan_id): # calling function that verify requested user id and write IN a file
IF placing_installment_date(loan_id): # calling function that place installment data IN a file
IF calculates_loan_emi(
verify_loan_request()
all_admin_functions()
verify_loan_request()
ELSEIF ch EQUALS 3:
view_transactions_menu()
ELSE:
main_menu()
OUTPUT("""
""")
IF ch EQUALS 1:
view_of_specific_customers()
ELSEIF ch EQUALS 2:
view_of_specific_loan_type()
ELSEIF ch EQUALS 3:
view_of_all_customers()
ELSEIF ch EQUALS 4:
view_transactions_of_all_types_loan()
ELSE:
all_admin_functions()
view_transactions_menu()
ELSE:
sys.exit()
DEFINE FUNCTION view_of_specific_customers():
SET table_data TO []
table_data.append(titled_data)
SET title TO ['Loan Id', 'Username', 'Loan Types', 'Applied Loan Amt', 'Loan Tenure', 'Loan Rate',
'Installment Amt',
'Due Amt']
goto_view_transactions_menu()
SET table_data TO []
IF loan_type IN loan_data: # checking userid and IF it finds, functions other task on the vary line
SET titled_data TO loan_data[1], loan_data[2], loan_data[4], loan_data[5], loan_data[6] + ' years',
loan_data[
table_data.append(titled_data)
SET title TO ['Loan Id', 'Username', 'Loan Types', 'Applied Loan Amt', 'Loan Tenure', 'Loan Rate',
'Installment Amt',
'Due Amt']
goto_view_transactions_menu()
SET table_data TO []
table_data.append(titled_data)
SET title TO ['Loan Id', 'Username', 'Loan Types', 'Applied Loan Amt', 'Loan Tenure', 'Loan Rate',
'Installment Amt',
'Due Amt']
view_of_all_customers()
goto_view_transactions_menu()
SET str_ud TO ','.join([str(e) FOR e IN user_data]) # converting user data into string
file.seek(0)
file.writelines(customer_details)
RETURN True
SET pending_users TO []
pending_users.append(ele)
SET title TO ["Name", "Address", "E-mail", "Contact No.", "Gender", "DOB", "Username", "Password", "Is
Admin",
"User Status"]
# ------------------------------------------------------
RETURN loan_id
# ------------------------------------------------------
IF len(loan_data) < 7: # total element with loanid IN one line of loan_details.txt is 7 so IF more it does
not give unique id
SET str_loan_data TO ','.join([str(e) FOR e IN loan_data]) # converting user data into comma separated
string
file.seek(0)
file.writelines(loan_details)
IF loan_id IN loan_details[elem]: # checking userid and IF it finds, functions other task on the vary line
loan_data[0].replace(',', '-')
SET str_loan_data TO ','.join([str(e) FOR e IN loan_data]) # converting user data into string
file.seek(0)
file.writelines(loan_details)
RETURN True
IF loan_id IN loan_details[elem]:
IF loan_tenure <= 5:
ELSE:
IF loan_tenure <= 5:
IF loan_tenure <= 5:
IF loan_tenure <= 5:
ELSE:
loan_data.insert(7, loan_rate)
SET str_loan_data TO ','.join([str(e) FOR e IN loan_data]) # converting user data into string
file.seek(0)
file.writelines(loan_details)
RETURN True
# ------------------------------------------------------
RETURN installment_date
# ------------------------------------------------------
SET pending_loans TO []
pending_loans.append(ele)
SET title TO ["Applied Date", "Loan ID", "Username", "Loan Type", "Loan Amount", "Loan Tenure",
"Loan Status"]
IF loan_id IN loan_details[elem]: # checking userid and IF it finds, functions other task on the vary line
SET str_loan_data TO ','.join([str(e) FOR e IN loan_data]) # converting user data into string
file.seek(0)
file.writelines(loan_details)
RETURN True
WHILE True:
TRY:
OUTPUT("""
2. Loan Calculator
""")
except ValueError:
ELSE:
show_loan_details()
emi_calculation()
register_new_account()
main_menu()
new_customer_functions()
ELSE:
sys.exit()
# age eligibitlity
WHILE True:
TRY:
except ValueError:
ELSE:
RETURN dob
break
ELSE:
WHILE True:
filter(None, customer_list.split('\n'))) # splitting by new line and removing empty strings from list
SET flag TO 0
TRY:
SET flag TO 1
EXCEPT:
RETURN usr_name
break
ELSE:
IF not flag:
break
ELSE:
# RETURN True
WHILE 1:
IF len(usr_pswd) < 8:
ELSEIF not re.search(pswd_pattern, usr_pswd): # check password and password pattern are satified or
not
ELSE:
RETURN usr_confirm_pswd
break
ELSE:
TRY:
except FileNotFoundError:
ELSE:
IF fp:
fp.close()
fp.write(user_info)
fp.close()
new_customer_menu()
new_customer_menu()
WHILE True:
break
break
ELSE:
registered_customer_menu(usr_name)
WHILE 1:
OUTPUT("""
3. View Transaction
4. Status of Loan
TRY:
except ValueError:
ELSE:
IF registered_customer_func EQUALS 1:
IF show_loan_details():
apply_for_loan(usr_name)
# registered_customer_menu(usr_name)
pay_loan_installment(usr_name)
view_transactions(usr_name)
main_menu()
SET table_data TO []
IF usr_name IN loan_details[elem]: # checking userid and IF it finds, functions other task on the vary
line
table_data.append(titled_data)
SET title TO ['Payment Date', 'Loan Id', 'User', 'Paid Amount', 'Due Amount']
goto_customer_menu(usr_name)
OUTPUT()
SET title TO "Loan Details"
OUTPUT()
SET title TO ['Loan Types', 'Upto 5 years', 'Upto 10 years', 'Above 10 years']
RETURN True
DEFINE FUNCTION apply_for_loan(usr_name): # function that asks user details FOR loans
TRY:
except FileNotFoundError:
ELSE:
IF fp:
fp.close()
fp.write(apply_loan)
fp.close()
DEFINE FUNCTION available_loan_types(): # shows avalilable loans and asks users to choose loans
SET loan_lst TO ["1. Education Loan ", "2. Car Loan ", "3. Home Loan", "4. Personal Loan"]
OUTPUT(f' {types}')
WHILE True:
TRY:
except ValueError:
OUTPUT("Number INPUT are only acceptable !!!")
available_loan_types()
ELSE:
IF ch EQUALS 1:
ELSEIF ch EQUALS 2:
ELSEIF ch EQUALS 3:
ELSEIF ch EQUALS 4:
SET title TO ['Loan Id', 'Username', 'Loan Types', 'Applied Loan Amt', 'Loan Tenure', 'Loan Rate',
'Installment Amount',
'Due Amount']
SET table_data TO []
table_data.append(titled_data)
user_view_user_loans(usr_name)
ELSE:
registered_customer_menu(usr_name)
break
with open('applied_loan.txt', 'w') as file:
file.write(ele + '\n')
goto_customer_menu(usr_name)
IF usr_name IN loan_data: # checking userid and IF it finds, functions other task on the vary line
OUTPUT(f"\n-----------Loan Details-------------\n")
OUTPUT(f"Username : {loan_data[2]}")
OUTPUT(f"Loan ID : {loan_data[1]}")
registered_customer_menu(usr_name)
ELSE:
sys.exit()
WHILE True:
TRY:
OUTPUT("""
1. Admin
2. New Customer
3. Registered Customer
4. Exit
""")
SET system_users TO int(INPUT("Select your login method from the following (1-3): "))
OUTPUT()
admin_login()
new_customer_functions()
reg_customer_login()
sys.exit()
ELSE:
OUTPUT("You made the wrong choice. Please select the choice between 1-3 !!!\n\n")
except ValueError:
Flowchart overview
User enter: For the program that was utilized, this is a set variable. There are a
number various variables that are utilized to store express information (brief,
dependent upon commitment to) for this movement, and every one of the elements
won't be covered in light of the fact that they are for the most part unmistakable.
Def admin function ():This code is used to explain a direct framework that is kept in
the overseer limit's summary (). Since it is shown to fill in as prepared (alluding to the
elements, limits, and various perspectives set aside in the definition), it will in general
be arranged inside comparative report in the total of the substance (). All through the
program, different isolating limits were utilized, similarly as basic articulations, for
instance, director work (), for the most part to do whatever it takes not to duplicate
mylist[0]: This was fundamentally used to pick the segment of the once-over; it will
peruse the data put away in the line assigned for login purposes, etc. Then, at that
point, it will check if the data (for instance, username and secret expression) is
predefined text archive reliant upon the record name in the segment. The manager
utilized this archive to examine the new client requests. It was opened in read
configuration, portrayed in r plan. Various divisions, for instance, "a" for extension
and "w" for forming an opened archive, were moreover given this application. On this
line, the 'Not enrolled customer' text record was opened in read mode and saved as a
respectable factor called 'record.' For the rest of the action, puts that reference
"record" in read mode will use this substance archive to play out the technique.
FileNC.write():This is a capacity that will modify the substance of a txt record
dependent on what is written in it (). fileNC is a variable for this situation, and 'Not
constrained by a data work, and it will then, at that point be put away in the record as
per what is inside. (Just to list a couple of model factors: Customer secret expression,
If New customer enter == ‘2’: This line is used to check whether the variable 'New
customer segment' is identical to the value entered. If the data is overall '2', for
mistakes from happening in a future record, like changes. At the point when the
structure from the 'update' text record (Loan detail.txt), and it may moreover be used
to find the very term that was entered in the past action. It can moreover take the lines
read by request and print them according to the rest of the solicitation until the record
configuration is found.
payinst: This is the right factor that makes up the scrutinize for the above
data/question "Enter Loan ID:." The worth entered will be saved endlessly as this
variable, which will then, at that point be noted in the trade text report.
int():This request is conventionally used to change over the substance of the () from a
string to an entire number, which can be either sure or negative. As a result of the way
that the data in the archive is in string plan. If the value ought to be changed, it ought
to at first be changed over from string to entire number, after which it should be
changed. Especially on the off chance that you're working out or all the more short
framework.
For, if: The for circle is every now and again found in a social occasion where it can complete a
progression of declarations. There might be an If: else circle, settled circle, inside the for. Therefore,
it's utilized to rehash a bunch of code for various conditions relying upon how it's coded.