update
This commit is contained in:
@@ -1,23 +1,105 @@
|
|||||||
#recolter l'age des clients
|
#création des variables de bases
|
||||||
age = int(input("Quel est votre age ?"))
|
age = 18
|
||||||
price_mineur = 7
|
p_majeur = 12
|
||||||
price_majeur = 12
|
p_mineur = 7
|
||||||
i = 18
|
devise = "€"
|
||||||
d = "€" #devise est egale à devise
|
minimal = 10
|
||||||
if age >= i :
|
p_pop = 5
|
||||||
print("vous etes majeur ! veuillez payez 12€ !")
|
total_pop1 = p_mineur+p_pop
|
||||||
elif age <= i :
|
total_pop2 = p_majeur+p_pop
|
||||||
print("vous etes mineur ! veuillez payez 7€ !")
|
#recolte de l'age et comparaison
|
||||||
#proposition popcorn
|
option = int(input("Saisissez votre age :"))
|
||||||
pop_price = 5
|
#conditon de price
|
||||||
proposition = input("voulez vous du pop corn ? :")
|
if minimal < option < age :
|
||||||
if proposition == "oui" and age > i :
|
print("Vous etes mineur , ça fera :",p_mineur,devise)
|
||||||
print("parfait , la facture s'élève à:" , price_majeur+pop_price,"€")
|
elif minimal < option >= age :
|
||||||
elif age > i and proposition == "non" :
|
print("Vous etes majeur :",p_majeur,devise)
|
||||||
print("votre facture est de :", price_majeur,d)
|
elif option == minimal :
|
||||||
elif age < i and proposition == "non" :
|
print("Vous etes mineur , ça fera :",p_mineur,devise)
|
||||||
print("votre facture est de :" , price_mineur,d)
|
#condition d'age requis
|
||||||
elif age < i and proposition == "oui" :
|
while option < minimal :
|
||||||
print("votre facture est de :",price_mineur+pop_price,"€")
|
print("tu es trop jeune !")
|
||||||
|
option = int(input("Réecrivez votre age :"))
|
||||||
|
#souhaitez vous du pop corn ? si oui +5€
|
||||||
|
pop = str(input("Voulez vous aussi du pop corn ? :"))
|
||||||
|
R1 = "oui"
|
||||||
|
R2 ="non"
|
||||||
|
#regles du pop corn pour oui et non mineur
|
||||||
|
if pop == R1 and minimal < option < age :
|
||||||
|
print("Vous payez :",total_pop1,devise)
|
||||||
|
elif pop == R2 and minimal < option < age :
|
||||||
|
print("Vous payez :",p_mineur,devise)
|
||||||
|
#regles du pop corn pour oui et non majeur
|
||||||
|
elif pop == R1 and option >= age :
|
||||||
|
print("Vous payez :",total_pop2,devise)
|
||||||
|
elif pop == R2 and option >= age :
|
||||||
|
print("Vous payez :",p_majeur,devise)
|
||||||
|
#regles du pop corn pour les 10 ans
|
||||||
|
elif pop == R1 and age > option >= minimal :
|
||||||
|
print("Vous payez :",total_pop1,devise)
|
||||||
|
elif pop == R2 and age > option >= minimal :
|
||||||
|
print("Vous payez :",p_mineur,devise)
|
||||||
|
while pop != R1 and pop != R2 :
|
||||||
|
print("Choix Non Valide ❌")
|
||||||
|
pop = str(input("Voulez vous du pop corn ? :"))
|
||||||
|
if pop == R1 and minimal < option < age :
|
||||||
|
print("Vous payez :",total_pop1,devise)
|
||||||
|
elif pop == R2 and minimal < option < age :
|
||||||
|
print("Vous payez :",p_mineur,devise)
|
||||||
|
#regles du pop corn pour oui et non majeur
|
||||||
|
elif pop == R1 and option >= age :
|
||||||
|
print("Vous payez :",total_pop2,devise)
|
||||||
|
elif pop == R2 and option >= age :
|
||||||
|
print("Vous payez :",p_majeur,devise)
|
||||||
|
#regles du pop corn pour les 10 ans
|
||||||
|
elif pop == R1 and age > option >= minimal :
|
||||||
|
print("Vous payez :",total_pop1,devise)
|
||||||
|
elif pop == R2 and age > option >= minimal :
|
||||||
|
print("Vous payez :",p_mineur,devise)
|
||||||
|
#proposition des fils et prix
|
||||||
|
film1 = "anabelle"
|
||||||
|
film2 = "avatar"
|
||||||
|
film3 = "avengers"
|
||||||
|
film4 = "naruto"
|
||||||
|
avatar = 10
|
||||||
|
anabelle = 10
|
||||||
|
avengers =15
|
||||||
|
naruto = 20
|
||||||
|
# Choix des films
|
||||||
|
print("Les films disponibles sont : anabelle, avatar, Naruto et avengers")
|
||||||
|
choix_film = input("Lequel désirez-vous visionner ? : ")
|
||||||
|
|
||||||
|
# refus film anabelle pour mineur
|
||||||
|
while choix_film == film1 and option < age:
|
||||||
|
print("Vous êtes trop jeune pour ce film, veuillez en choisir un autre !")
|
||||||
|
choix_film = input("Choisissez un autre film : ")
|
||||||
|
|
||||||
|
# vérifier si film valide
|
||||||
|
if choix_film not in [film1, film2, film3, film4]:
|
||||||
|
print("Choix non valide ❌")
|
||||||
|
exit()
|
||||||
|
# CALCUL PRIX FILM
|
||||||
|
if choix_film == film1:
|
||||||
|
prix_film = anabelle
|
||||||
|
elif choix_film == film2:
|
||||||
|
prix_film = avatar
|
||||||
|
elif choix_film == film3:
|
||||||
|
prix_film = avengers
|
||||||
|
elif choix_film == film4:
|
||||||
|
prix_film = naruto
|
||||||
|
# CALCUL PRIX BASE (âge)
|
||||||
|
if option >= age:
|
||||||
|
prix_base = p_majeur
|
||||||
else:
|
else:
|
||||||
print("choix invalide")
|
prix_base = p_mineur
|
||||||
|
# CALCUL FINAL POPCORN
|
||||||
|
if pop == R1:
|
||||||
|
facture = prix_base + prix_film + p_pop
|
||||||
|
elif pop == R2:
|
||||||
|
facture = prix_base + prix_film
|
||||||
|
else:
|
||||||
|
print("Choix non valide ❌")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
print("Votre facture est :", facture, devise)
|
||||||
|
print("Merci à Vous Bon Visionnage !!🍿")
|
||||||
Reference in New Issue
Block a user