Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started