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 fourdigit number
from this, extract the last four characters to the variable named lastfour
the variable should have type "string"
multiply the variable by
use typecasting
if the result is less than
print small
else if less than
print medium
else
print large
gracefully handle errors using tryexcept functionality
: #test your code using user input:
: #test your code using user input: John
: #test your code using user input: Johnson
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
