Question: Combining most of the information we learned this week, write a function that does the following. An input statement that requests the user for their

Combining most of the information we learned this week, write a function that does the following.
An input statement that requests the user for their name followed by their favorite four-digit number
from this, extract the last four characters to the variable named last_four
the variable should have type "string"
multiply the variable by 1.5
use typecasting
if the result is less than 5000
print small
else if less than 10000
print medium
else
print large
gracefully handle errors using try-except functionality
-[17]: #test your code using user input: 230
-[23]: #test your code using user input: John3333
[22]: #test your code using user input: Johnson
 Combining most of the information we learned this week, write a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!