Skip to content
View Jaffar451's full-sized avatar

Block or report Jaffar451

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Jaffar451/README.md
  • 👋 Hi, I’m @Jaffar451
  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...
  • 😄 Pronouns: ...
  • ⚡ Fun fact: ...

class Produit: def init(self, nom, prix, quantite): self.nom = nom self.prix = prix self.quantite = quantite

class Inventaire: def init(self): self.liste_produits = []

def ajouter_produit(self, produit):
    self.liste_produits.append(produit)

def afficher_inventaire(self):
    for produit in self.liste_produits:
        print(f"Produit: {produit.nom}, Prix: {produit.prix}, Quantité: {produit.quantite}")

Création de produits

produit1 = Produit("Smartphone", 599, 10) produit2 = Produit("Ordinateur portable", 1299, 5)

Création de l'inventaire

inventaire = Inventaire()

Ajout de produits à l'inventaire

inventaire.ajouter_produit(produit1) inventaire.ajouter_produit(produit2)

Affichage de l'inventaire

inventaire.afficher_inventaire()

Popular repositories Loading

  1. Jaffar451 Jaffar451 Public

    Config files for my GitHub profile.

  2. site-justice-mobile site-justice-mobile Public

    TypeScript