Checkpoint python pizza
macdi011 opened this issue · comments
print("Bienvenue dans Python Pizza Delivery")
taille =str(input("Quelle taille de pizza souhaitez-vous? (S, M, L): "))
if taille=="S":
print("vous avez choisi une petite pizza")
elif taille=="M":
print("vous avez choisi une pizza moyenne")
elif taille=="L":
print("vous avez choisi une grande pizza")
else:
print("saisie incorrecte choisir (S/M/L)")
add_pepperoni = input("Voulez-vous ajouter du pepperoni? (Y/N): ")
if add_pepperoni== "Y" :
print("vous avez choisi du pepperoni")
elif add_pepperoni== "N" :
print("vous n'avez pas choisi du pepperoni")
else :
print("saisie incorrecte ,choisir (Y/N)")
extra_cheese = input("Voulez-vous ajouter du fromage supplémentaire? (Y/N): ")
if extra_cheese== "Y":
print("vous avez choisi un supplement fromage")
elif extra_cheese== "N":
print("vous n'avez pas choisi un supplement fromage")
else:
print("saisie incorrecte ,choisir(Y/N)")
commande=print("votre commande est une pizza de taille" +" "+ taille, add_pepperoni, extra_cheese)
calcul de la facture totale
price = 0
if taille == "S":
price += 15
elif taille == "M":
price += 20
elif taille == "L":
price += 25
if add_pepperoni == "Y":
if taille == "S":
price += 2
else:
price += 3
if extra_cheese == "Y":
price += 1
print(f"Votre facture finale est de: {price} $.")