+ 1
Only 4 out of the 6 test cases are correct, what am I doing wrong? . It's the No Numeral exercise
sentence = str(input()).lower() phrase = sentence.split(" ") numbers = {"10":"ten", '0':'zero', '1':'one', '2':"two", '3':'three', '4':'four', '5':'five', "6":"six", "7" : 'seven', '8':'eight', '9':'nine'} output = "" for item in phrase: output+=numbers.get(item, item) + " " print(output)
1 Respuesta
+ 6
It's not necessary to change all characters to lowercase.
sentence = input()