+ 11
No numeral
Does anyone have sixth case test? Is the following code incorrect? text = input() t = text.split() lengh = len(t) for i in range(0,lengh): if t[i]=='0': t[i]='zero' if t[i]=='1': t[i]='one' if t[i]=='2': t[i]=='two' if t[i]=='3': t[i]='three' if t[i]=='4': t[i]='four' if t[i]=='5': t[i]='five' if t[i]=='6': t[i]='six' if t[i]=='7': t[i]='seven' if t[i]=='8': t[i]='eight' if t[i]=='9': t[i]='nine' elif t[i]=='10': t[i]='ten' print(' '.join(t))
10 Respuestas
+ 6
import re
dic = {'1':'one', '2':'two', '3':'three',
'4':'four', '5':'five', '6':'six',
'7':'seven', '8':'eight','9':'nine',
'0' : 'zero','10':'ten'}
s = input()
ne = s.split(' ')
for i in ne:
if(i in dic):
s = s.replace(i,dic[i])
print(s)
+ 11
Please do not continue this pointless discussion.🌸🌸
+ 11
Rithea Sreng
Thanks🌸
+ 10
Sami Khan
Oh
Sorry
Guilty editor
+ 8
Sami Khan
Thanks
+ 2
Zahra P it's ok.. just make sure sure it's "Sami" Khan 😒😒
+ 2
Abhay it was mentioned in the question "six case test" and question title is no numeral.. that should be enough to guess..
+ 2
Abhay well then, u should have tried, to guess around.. I have been guessing around in this Q&A sections for almost 4 years. I've got the skills to guess.
0
As 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 said question isn't complete ,how do people know that no numeral is a code coach question? Also you didn't linked the code so we could see what wrong you are doing in order to correct it
0
Sami Khan yup only for you I guess ,how do those who don't know about code coach will understand anything from sixth case test?
and also you provided answer instead of asking for the code from questionnaire to see what mistake they maybe doing and then correct that