vendredi 30 novembre 2018

Why do i keep getting a bad input error regarding this string statement?

I have a syntax error that I am confused on within my python code

deliveryValue= input("Is this order for delivery? Y/N")
float (DeliveryTime = 0)
str (zipcode=none)
float (DeliveryFee =0)
if deliveryValue == 'y' or 'Y':
    address = input ("what is the delivery address?")
    zipcode = input ("What zipcode is the address in?")
        if zipcode == 84041:
            DeliveryTime = 30
            DeliveryFee = 6.50
        else:
            DeliveryTime = 45
            DeliveryFee = 7.50
else:
    DeliveryFee = 0

the if zipcode == 84041: line comes out with an error, however I have tried placing ' ' and " " around it and still has the same error. Am i writing this correctly?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire