Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cout_location(type_voiture,nb_jours):
- # citadine
- if type_voiture=="citadine" and nb_jours <=7 :
- res = nb_jours * 30
- if type_voiture=="citadine" and (nb_jours >7 and nb_jours <=14):
- res = nb_jours * 27
- if type_voiture=="citadine" and nb_jours >14 :
- res = nb_jours * 25
- # berline
- if type_voiture=="berline" and nb_jours <= 7:
- res =nb_jours * 35
- if type_voiture=="berline" and (nb_jours >7 and nb_jours <14) :
- res = nb_jours * 30
- if type_voiture=="berline" and nb_jours > 14 :
- res =nb_jours * 27
- # utilitaire
- if type_voiture=="utilitaire" and nb_jours <= 7:
- res = nb_jours * 40
- if type_voiture=="utilitaire" and (nb_jours >7 and nb_jours < 15 ):
- res = nb_jours * 35
- if type_voiture=="utilitaire" and nb_jours >=15 :
- res = nb_jours * 30
- # cabriolet
- elif type_voiture=="cabriolet" and nb_jours > 0:
- res = nb_jours * 80
- return res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement