dimanche 22 juillet 2018

Syntax error on correct usage of else statement

I keep getting

SyntaxError: invalid syntax on line 10 (else statement)

I've checked my code over and over but I haven't found what's wrong with it. Help me.

def phoneCall(min1, min2_10, min11, s):
    minutes = 0 
    costs = [min1, min2_10, min11]
    for i in costs:
        if s > 0:
            if i == min1:
                minutes += 1
            elif i == min2_10:
                minutes += ((s//(min2_10 * 9)) * min2_10
            else:
                minutes += s/min11
    return minutes   

Aucun commentaire:

Enregistrer un commentaire