Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started