Loan Approval Program using Nested If
17 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What will be the output of the program if the user enters an age less than 25?

  • Sorry, Your are not eligible due salary
  • Loan Approved
  • Sorry, Loan Rejected due to less exp
  • Sorry, Your are below age (correct)
  • What is the purpose of the nested-if statement in the loan approval program?

  • To check if the user is eligible for a loan (correct)
  • To calculate the interest rate on the loan
  • To verify the user's identity
  • To determine the loan amount
  • What will happen if the user enters an experience less than 5?

  • Sorry, Loan Rejected due to less exp (correct)
  • Sorry, Your are below age
  • Sorry, Your are not eligible due salary
  • Loan Approved
  • What is the minimum salary required for loan approval in the given program?

    <p>25000</p> Signup and view all the answers

    What is the correct pin in the banking system program?

    <p>5609</p> Signup and view all the answers

    What is the purpose of the 'if' statement in Python?

    <p>To make a decision and execute a block of code</p> Signup and view all the answers

    What type of control flow statement is used for decision making and branching?

    <p>Conditional Statements</p> Signup and view all the answers

    What is the syntax for a basic 'if' statement in Python?

    <p>if condition : statement</p> Signup and view all the answers

    What type of 'if' statement is used when there are multiple options?

    <p>if-elif-else statement</p> Signup and view all the answers

    What is the purpose of the 'elif' clause in an 'if' statement?

    <p>To specify an alternative block of code</p> Signup and view all the answers

    What is the purpose of the 'else' clause in an 'if' statement?

    <p>To specify a block of code to execute when the condition is false</p> Signup and view all the answers

    What is the purpose of the if-else statement?

    <p>To make a decision based on a condition</p> Signup and view all the answers

    What is the output of the code: if num == 100: print('Hello Python') if num is 50?

    <p>Nothing is printed</p> Signup and view all the answers

    What is the output of the code: if option == 1: print('Withdraw Option Selected') if option is 2?

    <p>Deposit Option Selected</p> Signup and view all the answers

    What is the purpose of the elif statement in a if-elif-else block?

    <p>To check multiple conditions</p> Signup and view all the answers

    What is the output of the code: if avg &gt;= 90: print('Outstanding') if avg is 95?

    <p>Outstanding</p> Signup and view all the answers

    What is the purpose of the else statement in a if-else block?

    <p>To specify a default action</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser