Question: 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

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!