Introduction To Python Programming 1
Introduction To Python Programming 1
Submitted to
Dr. Lalit Prasad
Associate Professor (Chemistry),
School of Basic and Applied Science, Galgotias University
QUESTION
Problem#6:
The Metro Bank provides various types of loans such as car loans, business loans and house loans to its account holders. Write a
python program to implement the following requirements:
• Initialize the following variables with appropriate input values:account_number, account_balance, salary, loan_type
loan_amount_expected and customer_emi_expected.
• The account number should be of 4 digits and its first digit should be 1.
• The customer should have a minimum balance of Rupees 1 Lakh in the account.
• If the above rules are valid, determine the eligible loan amount and the EMI that the bank can provide to its customers based
on their salary and the loan type they expect to avail.
• The bank would provide the loan, only if the loan amount and the number of EMI’s requested by the customer is less than o
equal to the loan amount and the number of EMI’s decided by the bank respectively.
Display appropriate error messages for all invalid data. If all the business rules are satisfied ,then display account number, eligible
and requested loan amount and EMI’s.
Test your code by providing different values for the input variables.
ALGORITHM
The Metro Bank provides various types of loans such as car loans, business loans and house loans to its account
holders. Write a python program to implement the following requirements:
• Start
• Initialise eligible_loan_amount, bank_emi_expected=, eligible_loan_amount with zero
• Use the condition statement to find a person eligible for loan or not then print account_number,
eligible_loan_amount, bank_emi_expected, loan_amount_expected, customer_emi_expected if it is eligible
else The customer is not eligible for the loan if not.
• For carsCustomer is eligible if account_number is between 1000 and 2000, salary is between 25000 and
50000, customer_emi_expected is smaller than equal to 36 and loan_amount_expected is between 0 ands
50000. Then the customer is eligible_loan_amount=500000 and bank_emi_expected=36
• For House Customer is eligible if salary is between 50000 and 75000, customer_emi_expected between 30
and 60 and loan_amount_expected is between 500000 and 6000000. Then the customer is
eligible_loan_amount=6000000 and bank_emi_expected=60
• For BusinessCustomer is eligible if salary is greater than 75000, customer_emi_expected between 60 and 84
and loan_amount_expected is between 600000 and 7500000. Then the customer is
eligible_loan_amount=7500000 and bank_emi_expected=84
• Exit.
RESULT
CODE
RESULT
CODE
RESULT
CODE
RESULT
CODE
OUTPUT :
Flow chart
Start
eligible_loan_amount = 0
bank_emi_expected = 0