You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enter=input('Please enter a number between 0 - 99 : ')
39
+
40
+
number=int(enter)
41
+
42
+
defconvert_number(number):
43
+
# return number]
44
+
ifnumber<20:
45
+
returnlow_numbers[number]
46
+
elifnumber<100:
47
+
tens_digit=number//10
48
+
ones_digit=number%10
49
+
last_one=int(str(number)[-1:]) #calling the the last number that is being inputed
50
+
iflast_one==0: # its saying that its only calling the last number if it is 0
51
+
returnf'{ten[tens_digit]}'# once all those requirments are met it'll return the tens but what its doing is that it goes into the tens and then calling out the 10s digit it looks at the tens position of what was inputed and reads of the single digit
returnf'{hundreds_word+" "+ten[new_tens]}'#placing this here to be able to get the numbers with 0 at the end, from having it say number then adding zero also placement beacause it needs to run all of that to be able to distinguish when it needs to use it
0 commit comments