- 
                Notifications
    You must be signed in to change notification settings 
- Fork 317
Description
je ne suis pas bon parler ni ecrire donc je vous laisse voire vous meme
class Chat:
def init(self, nom="inconnue"):
self.nom = nom
def se_presenter(self):
print(f"Bonjour, tu es un chat et tu t'appelle {self.nom}")
class Personne:
def init_(self, nom: str):
self.nom = nom
def se_presenter(self):
print(f"Bonjour, je suis une personne et je m'appelle {self.nom}")
chat1 = Chat()
chat1.se_presenter()
chat2 = Chat("Garfield")
chat2.se_presenter()
personne = Personne("Jean")
personne.se_presenter()
Dernières 8 touches :
& Space C : / U s e
Exception :
System.ArgumentOutOfRangeException: La valeur doit être supérieure ou égale à zéro et inférieure à la taille de la mémoire tampon de la console dans cette dimension.
Nom du paramètre : left
à System.Console.SetCursorPosition(Int32 left, Int32 top)
à Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
à Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
à Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
à Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
à Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) à Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
à Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
à Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
PS C:\dess> & C:/Users/Alexander/AppData/Local/Programs/Python/Python313/python.exe c:/dess/mise_en_situation_0.py
Bonjour, tu es un chat et tu t'appelle inconnue
Bonjour, tu es un chat et tu t'appelle Garfield
Traceback (most recent call last):
File "c:\dess\mise_en_situation_0.py", line 18, in 
personne = Personne("Jean")
TypeError: Personne() takes no arguments
PS C:\dess>