From 36f24a59b1cf94c43a13d36434cc4b53ae552a09 Mon Sep 17 00:00:00 2001 From: ykyliane Date: Sun, 7 Jun 2026 23:48:17 +0200 Subject: [PATCH] new update --- banque.py | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 banque.py diff --git a/banque.py b/banque.py new file mode 100644 index 0000000..f81aaa0 --- /dev/null +++ b/banque.py @@ -0,0 +1,56 @@ +#variables de bases +devise = "€" +montant_initial = 2000 +ID = "Romeo" +MDP = "bazouzou" +ID2 = "Hassan" +MDP2 ="Haram" +tentative = 0 +max_tentative = 3 +reponse = True +initiale = True +#page de sécurité +while tentative < max_tentative : + choix_ID = str(input("Veuillez saisir votre identifiant 👤 :")) + choix_MDP = input("Veuillez saisir votre Mot de passe 🔒 :") + if choix_ID == ID and choix_MDP == MDP or choix_ID == ID2 and choix_MDP == MDP2 : + print("Bienvenue ,",choix_ID,"✅") + break + elif not (choix_ID == ID and choix_MDP == MDP or choix_ID == ID2 and choix_MDP == MDP2): + tentative = tentative+1 + print("Mot de passe ou Identifiant incorrect !❌") + if tentative == max_tentative : + print("Nombre de tentatives Max atteint reessayez plus tard !!⏱️") + exit() +#Menu +while initiale == True : + print("Alors",choix_ID,"Que désirez vous ?") + affichage = """ + 1- Consulter le solde + 2- Faire un retrait + 3- Faire un dépot + 4- Se déconnecter + """ + print(affichage) + print("choisissez entre 1, 2 , 3 et 4 :") + #choix du service + option = int(input()) + if option == 1 : + print("Votre solde est de :",montant_initial,devise) + elif option == 2 : + while reponse == True : + print("Combien voulez retirer ? :") + retrait = int(input("Veuillez saisir le montant :")) + if retrait <= montant_initial : + reponse = False + print("vous avez retirez :",retrait,devise) + print("Votre nouveau solde est de :",montant_initial-retrait,devise) + elif retrait >montant_initial : + print("Votre solde est insuffisant pour effectuer cette opération !❌") + elif option == 3 : + print("veuillez saisie le montant que vous voulez déposer :") + deposer = int(input()) + print("Opération réussi , votre nouveau solde est de ✅:",deposer+montant_initial,devise) + elif option == 4 : + initiale = False + print("Déconnexion reussie !✅") \ No newline at end of file