Question: Background Consider the number 9876 . Here, we will define: - 6 to be the Oth digit, - 7 to be the 1 st digit,
Background Consider the number 9876 . Here, we will define: - 6 to be the Oth digit, - 7 to be the 1 st digit, - 8 to be the 2 nd digit, and - 9 to be the 3rd digit In other words, we're counting the digits backwards, and starting from 0 . Task Standard input consists of two positive integers, one per line. Take n to be the first integer, and p to be the second. Write a Python script named pick-digit.py which outputs the p-th digit of n. Example standard input 1 Example standard output 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
