Question: Q 8 Write a Python program that reads a possibly - negative integer n and a non - negative int k , and displays the

Q8 Write a Python program that reads a possibly-negative integer n and a non-
negative int k, and displays the k th digit of n, starting from 0, counting from
: the right. So
If the input is 789 and 0, it displays "9"
If the input is 789 and 1, it displays "8"
If the input is 789 and 2, it displays "7"
If the input is 789 and 3, it displays "0"
If the input is -789 and 0, it displays "9"
 Q8 Write a Python program that reads a possibly-negative integer n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!