Retired

MHTTU (retired)

Description:

Define a function to help learners recognise the value of each digit in a number. The argument will be an integer, greater than 0  and less than 1 billion, and the code should return a string. For example:-

n = 1234 should return "1   Thousand,   2   Hundreds,   3   Tens,   4   Units"

In the case of a number equal to or greater than 1 million, three digits should always be shown for thousands as indicated below:-

n = 1000000 should return "1   Million,  000   Thousands,  0   Hundreds,  0   Tens,  0   Units"

n = 1002000 should return "1  Million,  002  Thousands,  0  Hundreds,  0  Tens,  0  Units"

An invalid input should return None

Fundamentals

Stats:

CreatedSep 24, 2020
Warriors Trained20
Total Skips0
Total Code Submissions61
Total Times Completed12
Python Completions12
Total Stars0
% of votes with a positive feedback rating41% of 11
Total "Very Satisfied" Votes3
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes5
Total Rank Assessments11
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • barryG Avatar
Ad