Question: Presentation exercise 6 Write a function called num_of_digits which takes as input an integer and returns the number of digits in input number. For example,

Presentation exercise 6 Write a function called num_of_digits which takes as input an integer and returns the number of digits in input number. For example, num_of_digits(6539) returns 4. Note that the input integer is not necessarily a positive number. Using this function, write another function (including docstring) called curious which takes as input an integer and returns true if the input represents a curious number, false otherwise. An n digit number is said to be curious if the last n digits of its square are equal to the original number. For example, curious ( 25 ) returns True, since 25 contains two digits and the last two digits of its square (625) are equal to 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
