0
Need help
Hi! Good Afternoon! Can anyone send me the test case 4 and test case 5 of the coad coach problem: "No numerals"?
4 Respuestas
+ 3
Ok. Thank you for the help. Now my code works. After deleting the line lower() case conversation, the code is running.
+ 1
#Print number in words for 0-10 in a phrase - No Numerals
s=input()
s=s.lower()
x=s.split(' ')
word={'0':'zero','1':'one','2':'two','3':'three','4':'four','5':'five','6':'six','7':'seven','8':'eight','9':'nine','10':'ten'}
t=''
for i in x:
if i in word:
t=t+word[i]+' '
else:
t=t+i+' '
s=t
del t,x,word
print(s)
+ 1
This is my code. I am not a pro member so the test case 4 and 5 is not showing. Thats why I posted. Except those cases others are passed.