0
Pig Latin
Need help, I don't get it why case#3 and case#5 didn't passed txt = input().split() for i in txt: k = i.replace(i[0],"") + i[0] + 'ay' print(k, end = " ")
2 Antworten
+ 3
I think , this approach of replace function replaces all i[0] in the i (i.e dublicates, for ex : 'aaaabc' replaced by 'bc' just)...
0
My solution:
woorden = input().split()
zin =""
for x in woorden:
y = ""
firstL = x[0]
for i in range(len(x)):
if i==0:
continue
y += x[i]
y = y + firstL + "ay"
zin += y+" "
print (zin)