0

Errors in snake master game Python codes

What's wrong with that Python codes to not run?. I tried to fix the problem but it didn't respoded and/or fixed https://code.sololearn.com/c67jpJY74gNc/?ref=app

14th Feb 2020, 7:38 PM
Abdul Kisiwa
Abdul Kisiwa - avatar
1 Odpowiedź
+ 3
The error message says that line 23 causes a typr error. You provide float numbers from food, but should be int. So you should modify line 20 as ahown here: food=[sh//2,sw//2] # make int not float with this change, the error message does not appear.
14th Feb 2020, 8:30 PM
Lothar
Lothar - avatar