I need to understand how to code this: calculate_rating - This function accepts the customer's name as an argument and returns a credit rating as an integer. All customers get an initial credit rating...

I need to understand how to code this:calculate_rating- This function accepts the customer's name as an argument and returns a credit rating as an integer. All customers get an initial credit rating based on the length of their name (minimum of 10). If the length of the customer's name is at least 12, the initial credit rating is 20. If the name is longer than 20 characters, the initial credit rating is 30. Then, in addition, if the customer's name is in all uppercase (indicating strength), their credit rating isincreasedby 30. Furthermore, if the name ends in the letters 'tor' (in uppercase or lowercase), the credit rating isincreasedby 50. So, for example, the credit rating returned by this function for the name 'Stephen' will be 10, and the rating for the name 'HUMONGOUS ENGLEBERT GIGANTOR' will be 110.
Sep 28, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here