+ 4

This code is crazy 😲 why it doesn't work

I tried to code coach new drivers license It seems to get all test cases correct but all except 3&5 test cases but when I add 1 to agents variable now 3&5 becomes correct but every other test cases fails this is confusing please tell me how to fix it and why this is happening here: https://code.sololearn.com/cn7vhwyl0kvK/?ref=app

25th May 2020, 9:51 AM
Atoms~⚛
Atoms~⚛ - avatar
1 ответ
+ 3
Try using people.index(myname) to determine the position. Then divide it by agents, multiply by 20 and finally add 20 (as index is counted from 0). Should work.
25th May 2020, 10:40 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar