57 lines
2.1 KiB
Python
57 lines
2.1 KiB
Python
#variables de bases
|
|
devise = "€"
|
|
montant_initial = 2000
|
|
ID = "Herve Gboloa"
|
|
MDP = "Vetcho07"
|
|
ID2 = "Sandrine Yobo"
|
|
MDP2 ="Sandy1982"
|
|
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 !✅")
|
|
print("Merci à Bientot !👋") |