+ 2
What doesn't works ?
Hello, I don't understand, pylon tells me my line with else: is invalid, but I was working before and I didn't touched it, how ? Any help ? Thank you order = int(input()) uprice = 5 tva = 7/100 discount = 10/100 if order == 1: total1 = uprice+uprice*tva print(total1) else: total = order*uprice totaltva = total+(total*tva) totaldiscount = totaltva-(totaltva*discount) res = "{:.2f}".format(totaldiscount) print (res)
3 Réponses
+ 5
Max Lang ,
the print(...) statement in the line above 'else:' needs to have an indentation
+ 2
Tank you very much, I still have a lot to learn
+ 1
Use 4 spaces indentation. It will be quite easier for you to see the blocks.