0

New Driver's license in python my solution got stuck in a test case can u plz help me out?

def licence(agents, customers_list, single): list.sort(customers_list) index = customers_list.index(single) og_time = (index+1)*20 og_time = og_time if agents==1 else og_time-(20*(agents-1)) return og_time me = input() agents = int(input()) costomers = input() customers_list = costomers.split(' ') customers_list.append(me) result = licence(agents, customers_list, me) print(result)

17th Sep 2021, 10:15 AM
Musab
Musab - avatar
1 Resposta
0
og_time = og_time if agents==1 else og_time-(20*(agents-1)) return og_time I think, the problem is here. Cause, it's written if condition, but there is no line after if. When there is an if condition, it must be a code line, or lines if the value is accepted. Check, the condition again, then you see. Happy coding!
18th Sep 2021, 7:29 PM
mesarthim
mesarthim - avatar