jeudi 21 janvier 2016

TypeError: unorderable types: str() >= int()? [duplicate]

This question already has an answer here:

I need to ask the user how many members of staff are working, then how many cars each have sold and if they have sold more than 4 cars, give them a bonus. problem is that i keep getting

(TypeError: unorderable types: str() >= int()) at line 18

Code

staff=[]
howmany=int(input("how many members are there?"))
total=howmany
memberNo=1

while total !=0:
    print("how many cars did memeber",memberNo,"sold:",end="")
    add=input("")
    total=total-1
    memberNo=memberNo+1
    staff.append(add)

total2=howmany
staffNo=0
memberNum=1

while total2 !=0:
    if (staff[memberNum]>=4):
        print("memeber",memeberNum,"has earned a bonus")
        memebernum=memebernum+1
        staffno=staffno+1

Aucun commentaire:

Enregistrer un commentaire