+ 1

Sololearn code coach .

I make the program but one answer not showing

23rd Aug 2020, 9:24 AM
Aman Singh
Aman Singh - avatar
4 Respostas
+ 1
Solution is a=input() k=len(a) m="" for i in range(k): if a[i]=="0": m+="zero" elif a[i]=="1" and a[i+1]!="0": m+="one" elif a[i]=="2": m+="two" elif a[i]=="3": m+="three" elif a[i]=="4": m+="four" elif a[i]=="5": m+="five" elif a[i]=="6": m+="six" elif a[i]=="7": m+="seven" elif a[i]=="8": m+="eight" elif a[i]=="9": m+="nine" elif a[i]=="1" and a[i+1]=="0": m+="ten" i+=1 else: m+=a[i] print(m)
23rd Aug 2020, 9:24 AM
Aman Singh
Aman Singh - avatar
+ 1
Sir i have increment i when detected 10 Please give me example
23rd Aug 2020, 10:17 AM
Aman Singh
Aman Singh - avatar