logo CodeStepByStep logo

print_last_digit

Language/Type: Python

Write a function named print_last_digit that prints information about the last digit of an integer in the following format. For example, the call of print_last_digit(3572) should print:

Last digit of 3572 is 2

You may assume that the parameter passed will be a non-negative integer.

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.