Vous êtes sur la page 1sur 2

Python TP N°3

Une auberge de dix chambres, chacune comporte deux lits simples offre un prix de la nuitée selon les
tarifs suivants

 De 1 à 3 nuits : 3000 DZD/nuit


 De 4 à 10 nuits : 2700 DZD/nuit
 De 11 à 30 nuits : 2200 DZD/nuit
 Plus de 30 nuits : 2000 DZD/ nuit

L’auberge offre également à ses clients des services supplémentaires payants selon les tarifs suivants.

 Le petit déjeuner : 300 DZD/personne


 Le déjeuner : 1000 DZD /personne
 Le diner : 800 DZD /personne
 Le transfert aéroport : 500 DZD à la course

L’auberge offre une remise de 10% si le total à payer dépasse 100 0000 DZD

Ecrire un programme python permettant de calculer le total à payer par un client selon ses choix.
Pour cela :

 Utiliser une tuple pour les tarifs de nuitée


 Une liste pour les tarifs de services
 Une constante pour le taux de réduction

Afficher à la fin

 Les frais en détails


 Le total des frais
 La remise
 Le total à payer

28/11/2023
Python Lab N°3 1st Year Master - Instrumentation

A hostel with ten rooms, each with two single beds, offers a price per night according to the
following rates
 From 1 to 3 nights: 3000 DZD/night
 From 4 to 10 nights: 2700 DZD/night
 From 11 to 30 nights: 2200 DZD/night
 More than 30 nights: 2000 DZD/night

The hostel offers its customers additional paid services at the following rates.
 Breakfast: 300 DZD/person
 Lunch: 1000 DZD/person
 Dinner: 800 DZD/person
 Airport transfer: 500 DZD per trip

The hostel offers a discount of 10% if the total payable exceeds 100,000 DZD
Write a python program to calculate the total payable by a customer according to its choices.
For that, use:
 A tuple for nightly rates
 A tuple for service rates
 A list for client’s choices
 A constant for the discount rate

Display at the end:


 The fees in details
 The total fees
 The discount
 The total payable

28/11/2023

Vous aimerez peut-être aussi