Académique Documents
Professionnel Documents
Culture Documents
Lab N°3
Lab N°3
Une auberge de dix chambres, chacune comporte deux lits simples offre un prix de la nuitée selon les
tarifs suivants
L’auberge offre également à ses clients des services supplémentaires payants selon les tarifs suivants.
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 :
Afficher à la fin
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
28/11/2023