Created
November 24, 2018 19:19
-
-
Save GravenilvecTV/9848be3ff531ee7c6d037148dac23f0e to your computer and use it in GitHub Desktop.
APPRENDRE LE PYTHON #2 ? LES VARIABLES
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # recolter une valeur porte monnaie | |
| wallet = int(input("Entrer le nombre d'€ que vous possedez")) | |
| print("Vous avez actuellement", wallet, "euros") | |
| # creer un produit qui aura pour valeur 50 | |
| produit = 50 | |
| print("Le Produit vaut ", produit, "euros") | |
| # enleve au "wallet" le prix du produit | |
| wallet = wallet - produit | |
| # ou wallet -= produit | |
| # afficher la nouvelle valeur | |
| print("Produit acheté !") | |
| print("Il ne vous reste plus que", wallet, "euros") |
pape123-sow
commented
Oct 28, 2025
via email
bonne continuation
Le mar. 28 oct. 2025, 16:50, stickamir ***@***.***> a écrit :
… ***@***.**** commented on this gist.
------------------------------
wallet = int(input("combien d'€ possédez vous ?"))
print("vous avez actuellement",wallet,"€")
produit = 50
print(" vous décidez d'acheter un produit.il vaut ",produit,"€")
cout_total = wallet - produit
if wallet>=produit:
print("vous pouvez acheter ce produit vous avez maintenant
",cout_total,"€")
else:
print("vous n'avez pas assez d'argent pour acheter ce produit ")
print("si vous l'auriez acheté vous seriez endetté de",cout_total,"€")
c'est mon premier projet publié sur github c'est franchement sympa parfait
pour débuter
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/GravenilvecTV/9848be3ff531ee7c6d037148dac23f0e#gistcomment-5833837>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BT3JZOYG5WAS5H5EP7X57A33Z6NFNBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLKJSGQYDONJUGI4TTJDOMFWWLKDBMN2G64S7NFSIFJLWMFWHKZNEORZHKZNENZQW2ZN3ORUHEZLBMRPXAYLSORUWG2LQMFXHIX3BMN2GS5TJOR4YFJLWMFWHKZNEM5UXG5FENZQW2ZNLORUHEZLBMRPXI6LQMWWHG5LCNJSWG5C7OR4XAZNLI5UXG5CDN5WW2ZLOOSTHI33QNFRXHEMCUR2HS4DFURTWS43UUV3GC3DVMWUDSMZSGA2TCOJTU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you are subscribed to this thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
@pape123-sow Franchement, merci ! Je ne m’attendais pas à recevoir un retour positif en moins d’une heure, surtout sur mon premier post !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

