Skip to content
Snippets Groups Projects
Commit a0809177 authored by Thierno Abdoulaye Diallo's avatar Thierno Abdoulaye Diallo
Browse files

Upload New File

parent 8a96672d
No related branches found
No related tags found
No related merge requests found
class Vehicule():
""" à_remplacer_par_ce_que_fait_la_classe
Exemple(s) :
$$$ vehicule_rouge=Vehicule('r',(3,2),2,'horizontale')
$$$ vehicule_rouge.couleur
'r'
$$$ vehicule_rouge.position
(3,2)
$$$ vehicule_rouge.longueur
2
$$$ vehicule_rouge.orientation
'horizontale'
"""
def __init__(self,couleur:str,position:tuple,longueur:int,orientation:str):
""" initialise une voiture tout en tenant compte de sa couleur et sa position
Précondition :
Exemple(s) :
$$$
"""
self.couleur=couleur
self.position=position
self.longueur=longueur
self.orientation=orientation
def __repr__(self):
""" à_remplacer_par_ce_que_fait_la_fonction
Précondition :
Exemple(s) :
$$$
"""
return f"({self.couleur},{self.position},{self.longueur},{self.orientation})"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment