Skip to content

Instantly share code, notes, and snippets.

@Steevedm
Forked from GravenilvecTV/main.py
Created November 16, 2025 02:19
Show Gist options
  • Select an option

  • Save Steevedm/e7e2ad6f7a1411bdd3db74edd556db1d to your computer and use it in GitHub Desktop.

Select an option

Save Steevedm/e7e2ad6f7a1411bdd3db74edd556db1d to your computer and use it in GitHub Desktop.
APPRENDRE LE PYTHON #2 ? LES VARIABLES
# 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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment