Question: main: This is the most important function, because it is responsible for calling your other functions in the right order. There are two strategies for

main: This is the most important function, because it is responsible for calling your other functions in the right order. There are two strategies for writing it: A) build it up incrementally as you write the other functions, or B) write this function only after you have implemented all the other functions.
print_introduction: This prints a brief message that greets the user. It consumes nothing and returns nothing.
input_name: This prompts the user to type in their name and prints some messages (including the user's name). It consumes nothing, but returns the user's name as a string.
calculate_rating: This is Grindlehook's function. Do not worry about how this function works, simply know that when its called, it returns the customer's rating as an integer. You will only be able to call it once per program's execution (afterwards it stops returning the right value). You cannot simply hardcode its value into your system, because it is different for each user. And, of course, you can't fix it because Grindlehook will get angry at you. Sadly, you will encounter Grindlehook's in many jobs, and learning to work around them is a valuable life skill.
print_rating: This prints the user's calculated rating (the result of calling calculate_rating). It consumes an integer (representing the rating) and returns nothing.
input_loan_amount: This prompts the user to type in their desired loan amount and prints some messages. It consumes nothing, but returns the loan amount as an integer. Remember, the input function returns a string, so you will need to convert the result using the built-in int function.
print_loan_availability: This function consumes a rating and a loan amount (in this order), and prints whether or not a loan is available to the user by calling the test_loan function. It does not return anything.
test_loan: This function consumes a rating and a loan amount (in this order), and returns whether or not a loan is available to the user by using the following formula: rating2*100>= loan amount. Note that this function returns a boolean, and does not print anything.
print_conclusion: This prints a brief message that thanks the user. It consumes nothing and returns nothing.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a basic structure of the functions described def main printintroduction name inputname rating ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!