trottinette.py

Created by pascal-chauvin

Created on February 01, 2019

388 Bytes

Un commerce de location de trottinette, avec le tarif suivant : * forfait pour la location : 5 € (hors-taxes) ; * 13 centimes d’€ (h.-t.) par heure commencée ; * taux de T.V.A. 20,6 %. Le logiciel établit les factures pour cinq clients.


#!/usr/bin/env python3

# fichier: trottinette.py
#  auteur: Pascal Chauvin
#    date: 2019/01/22

""" commerce de location de trottinettes """

def calcul_facture(client):
  print(client)
  n = float(input("nombre d'heures ? "))
  a_payer = (5 + n*0.13) * 1.206
  print("EU {:7.2f}\n".format(a_payer))

for client in ["A", "B", "C", "D", "E"]:
  calcul_facture(client)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.