Question: USING PYTHON 1. Write a function 'writeDec which outputs a decimal value [0,99991 2. Count from 0000 to 1000, in decimal, with no delay .
USING PYTHON

1. Write a function 'writeDec which outputs a decimal value [0,99991 2. Count from 0000 to 1000, in decimal, with no delay . Write a function 'writeHex which outputs a hexadecimal value [0,FFFFl 4. Count from 0000 to 1000, in hexadecimal, with no delay Hint: You can use //and % to extract a single digit from a number. The follow.ng code demonstrates how to retrieve the ith number (counted from 0, starting on the right) of the number in num: def get_digit(i, num): return (num / 10*#1) % 10 num12345 for i in range (0, 5): print "get_digit(", i, ", 12345) -", get digit(i, num)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
