@ -0,0 +1,10 @@
from math import *
taxeA = float(input())
taxeN = float(input())
prixA = float(input())
prixAHT = round(prixA + prixA*(-taxeA / 100))
prixN = prixAHT + prixAHT*(taxeN / 100)
print(round(prixN,2))
@ -0,0 +1,6 @@
ep = 0.110 / 10
for loop in range(15):
ep = ep * 2
print(ep)
@ -0,0 +1,32 @@
taille = int(input())
age = int(input())
poids = int(input())
cheval = int(input())
brun = int(input())
prob = 0
crit1 = (taille >= 178 and taille <= 182)
crit2 = (age >= 34)
crit3 = (poids < 70)
crit4 = (cheval == 0)
crit5 = (brun == 1)
if crit1:
prob +=1
if crit2:
if crit3:
if crit4:
if crit5:
if prob == 5:
print("Très probable")
elif prob == 4 or prob == 3:
print("Probable")
elif prob == 2 or prob == 1:
print("Peu probable")
else:
print("Impossible")
nbProduits = int(input())
nbPersonnes = int(input())
produits = [0] * (nbProduits - 1)
for personne in range(nbPersonnes):
idProduit = int(input())
produits[idProduit - 1] = produits[idProduit - 1] + 1
print()
for loop in range(nbProduits):
print(produits[loop - 1])
nbOperations = int(input())
qtRestante = [0] * (nbOperations * 2 + 1)
for loop in range(nbOperations):
nProduit = int(input())
qtProduit = int(input())
qtRestante[nProduit] = qtRestante[nProduit] + qtProduit
#print("Résultat :")
for idProduit in range(1, nbOperations * 2 + 1):
print(qtRestante[idProduit])
@ -0,0 +1,7 @@
cout = 0
prixIngredient = [9, 5, 12, 15, 7, 42, 13, 10, 1, 20]
for loop in range(10):
poidsIngredient = int(input())
cout = cout + prixIngredient[loop] * poidsIngredient
print(cout)
print("Test :")
nbHab = int(input())
jour = 1
persM = 1
while nbHab > persM:
persM = persM + 2
jour = jour + 1
print(jour, persM)
@ -0,0 +1,8 @@
nbNotes = int(input())
sommeNotes = 0
for loop in range(nbNotes):
note = int(input())
sommeNotes = sommeNotes + note
print(sommeNotes / nbNotes)
@ -0,0 +1,12 @@
nbFruits = int(input())
reste = (nbFruits % nbPersonnes) == 0
if reste:
print("oui")
print("non")
@ -0,0 +1,14 @@
nbAdeviner = int(input())
nbChoisi = 0
nbEssai = 0
while nbAdeviner != nbChoisi:
nbChoisi = int(input())
if nbChoisi < nbAdeviner:
print("C'est plus")
nbEssai +=1
elif nbChoisi > nbAdeviner:
print("C'est moins")
print("Nombre d'essais nécessaires :", nbEssai + 1)
@ -0,0 +1,9 @@
nbLegumes = int(input())
for loop in range(nbLegumes):
poidsLeg = float(input())
ageLeg = float(input())
prixLeg = float(input())
print(round(prixLeg / poidsLeg, 2))
@ -0,0 +1,13 @@
nbPierres = int(input())
pierre = 0
surEtage = 0
nbTotalPierres = 0
while nbPierres > 0:
pierre +=1
surfEtage = pierre ** 2
nbTotalPierres = nbTotalPierres + surfEtage
nbPierres = nbPierres - nbTotalPierres
print(pierre)
print(nbTotalPierres)
@ -0,0 +1,5 @@
nZone = int(input())
print(nZone % 24)
somme = 0
total = 0
while somme != -1:
total = total + somme
somme = int(input())
print(total)
sommeDépenses = 0
dépense = int(input())
while dépense != -1:
sommeDépenses = sommeDépenses + dépense
print(sommeDépenses)
@ -0,0 +1,3 @@
ingredient = int(input())
qtIngredient = [500, 180, 650, 25, 666, 42, 421, 1, 370, 211]
print(qtIngredient[ingredient])
nbMesures = int(input())
tempMin = int(input())
tempMax = int(input())
temp = int(input())
while temp <= tempMax and temp >= tempMin:
print("Rien à signaler")
print("Alerte !!")
@ -0,0 +1,16 @@
nbJetons = int(input())
for loop in range(nbJetons):
jetonX = int(input())
jetonY = int(input())
jauneX = (jetonX >= 0 and jetonX <= 90)
jauneY = (jetonY >= 0 and jetonY <= 70)
bleuX = (jetonX >= 10 and jetonX <= 85)
bleuY = (jetonY >= 10 and jetonY <= 55)
if jauneX and jauneY:
z = "Zone jaune"
if bleuX and bleuY:
z = "Zone bleue"
print(z)
if (jetonX >= 0 and jetonX <= 90) and (jetonY >= 0 and jetonY <= 70) and (jetonX >= 20 and jetonX <= 50 and jetonY >=20 and jetonY <= 45):
if (jetonX >= 10 and jetonX <= 85) and (jetonY >= 10 and jetonY <= 55):