Question: Write a program with the following functions: - def digits (n) - that returns the number of digits in a given number - def firstDigit
Write a program with the following functions: - def digits (n) - that returns the number of digits in a given number - def firstDigit (n) - that returns the first digit of a given number Ex: If the input is: Enter a digit: 1729 the output is: The number of digits in 1729 is 4 The last digit of 1729 is 9 where digit is a value >=0. Then write main() to: - get input for the digit, - call the functions, - and print output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
