这段代码错误在哪里,谢谢
def print_seat(seat):
for item in seat:
print("${0}".format(item))
print("-"*15)
total=get_seat_total(seat)
print("Total:${0}".format(total))
def get_seat_total(seat):
total=0
for dish in seat:
total=total+dish
return total
def food():
seats=[[19.35,34]]
grand_total=0
for seat in seats:
print_seat(seat)
grand_total=grand_total+get_seat_total(seats)
print("/n")
print("="*5)
print("Grand total:${0}".format(grand_total))
if __name__ == '__main__':
food()
def print_seat(seat):
for item in seat:
print("${0}".format(item))
print("-"*15)
total=get_seat_total(seat)
print("Total:${0}".format(total))
def get_seat_total(seat):
total=0
for dish in seat:
total=total+dish
return total
def food():
seats=[[19.35,34]]
grand_total=0
for seat in seats:
print_seat(seat)
grand_total=grand_total+get_seat_total(seats)
print("/n")
print("="*5)
print("Grand total:${0}".format(grand_total))
if __name__ == '__main__':
food()