0

Can someone tell me why doesn't this work?

https://code.sololearn.com/cVSBgih3NW3d/?ref=app

11th Jul 2019, 3:29 PM
GreeFoss XD
GreeFoss XD - avatar
3 Answers
+ 3
It's because you can't get a digit by index. You either have to make it a string, or use some method to get a digit
11th Jul 2019, 3:32 PM
Airree
Airree - avatar
+ 1
annee4 = str(int(annee3[0]) + int(annee3[1])) annee5 = str(int(annee4[0]) + int(annee4[1]))
11th Jul 2019, 3:56 PM
Diego
Diego - avatar
0
This doesn't work either, it tells me string index out of range
12th Jul 2019, 6:56 AM
GreeFoss XD
GreeFoss XD - avatar