Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON 3 PLEASE Whenever we think of numbers, we are actually thinking of them in relation to some base. Typically that base is 10. Each
PYTHON 3 PLEASE
Whenever we think of numbers, we are actually thinking of them in relation to some base. Typically that base is 10. Each number can be decomposed as a combination of the powers of it's base.
134 = 1 * 10^2 + 3 * 10^1 + 4 * 10^0
Write a function that takes a number and returns a list of it's decimal representation.
def decimal(n): """Return a list representing the decimal representation of a number.
>>> decimal(55055) [5, 5, 0, 5, 5] >>> decimal(-136) ['-', 1, 3, 6] """ "*** YOUR CODE HERE ***"
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