Question: Please solve as Python coding 4. get thDigitin, k) (15 pts) Write the function get thDigitin, k) that takes a possibly-negative int n and a
4. get thDigitin, k) (15 pts) Write the function get thDigitin, k) that takes a possibly-negative int n and a non-negative int k and returns the kth digit of n starting from 0. counting from the right. So: getKthDigit(789, 0) 9 getKthDigit(789, 1) getKthDigit(789, 2) 7 get thDigit(789, 3) - get thDigit(-789, ) - 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
