up
This commit is contained in:
commit
9d755dc551
10
arrond.py
Normal file
10
arrond.py
Normal file
@ -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))
|
6
epaisseur.py
Normal file
6
epaisseur.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
ep = 0.110 / 10
|
||||||
|
|
||||||
|
for loop in range(15):
|
||||||
|
ep = ep * 2
|
||||||
|
|
||||||
|
print(ep)
|
32
espion.py
Normal file
32
espion.py
Normal file
@ -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:
|
||||||
|
prob +=1
|
||||||
|
if crit3:
|
||||||
|
prob +=1
|
||||||
|
if crit4:
|
||||||
|
prob +=1
|
||||||
|
if crit5:
|
||||||
|
prob +=1
|
||||||
|
|
||||||
|
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")
|
10
etude.py
Normal file
10
etude.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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])
|
10
inventaire.py
Normal file
10
inventaire.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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])
|
7
listedecourses.py
Normal file
7
listedecourses.py
Normal file
@ -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)
|
10
malades.py
Normal file
10
malades.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
print("Test :")
|
||||||
|
nbHab = int(input())
|
||||||
|
jour = 1
|
||||||
|
persM = 1
|
||||||
|
|
||||||
|
while nbHab > persM:
|
||||||
|
persM = persM + 2
|
||||||
|
jour = jour + 1
|
||||||
|
|
||||||
|
print(jour, persM)
|
8
moyenne.py
Normal file
8
moyenne.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
nbNotes = int(input())
|
||||||
|
sommeNotes = 0
|
||||||
|
|
||||||
|
for loop in range(nbNotes):
|
||||||
|
note = int(input())
|
||||||
|
sommeNotes = sommeNotes + note
|
||||||
|
|
||||||
|
print(sommeNotes / nbNotes)
|
12
multiple.py
Normal file
12
multiple.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from math import *
|
||||||
|
|
||||||
|
nbPersonnes = int(input())
|
||||||
|
nbFruits = int(input())
|
||||||
|
|
||||||
|
reste = (nbFruits % nbPersonnes) == 0
|
||||||
|
|
||||||
|
if reste:
|
||||||
|
print("oui")
|
||||||
|
else:
|
||||||
|
print("non")
|
||||||
|
|
14
plusoumoins.py
Normal file
14
plusoumoins.py
Normal file
@ -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")
|
||||||
|
nbEssai +=1
|
||||||
|
|
||||||
|
print("Nombre d'essais nécessaires :", nbEssai + 1)
|
9
poids.py
Normal file
9
poids.py
Normal file
@ -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))
|
||||||
|
|
13
pyramide.py
Normal file
13
pyramide.py
Normal file
@ -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)
|
5
roue.py
Normal file
5
roue.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from math import *
|
||||||
|
|
||||||
|
nZone = int(input())
|
||||||
|
|
||||||
|
print(nZone % 24)
|
7
somme.py
Normal file
7
somme.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
somme = 0
|
||||||
|
total = 0
|
||||||
|
while somme != -1:
|
||||||
|
total = total + somme
|
||||||
|
somme = int(input())
|
||||||
|
|
||||||
|
print(total)
|
6
somme2.py
Normal file
6
somme2.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
sommeDépenses = 0
|
||||||
|
dépense = int(input())
|
||||||
|
while dépense != -1:
|
||||||
|
sommeDépenses = sommeDépenses + dépense
|
||||||
|
dépense = int(input())
|
||||||
|
print(sommeDépenses)
|
3
tableau.py
Normal file
3
tableau.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ingredient = int(input())
|
||||||
|
qtIngredient = [500, 180, 650, 25, 666, 42, 421, 1, 370, 211]
|
||||||
|
print(qtIngredient[ingredient])
|
10
tempalert.py
Normal file
10
tempalert.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
nbMesures = int(input())
|
||||||
|
tempMin = int(input())
|
||||||
|
tempMax = int(input())
|
||||||
|
temp = int(input())
|
||||||
|
|
||||||
|
while temp <= tempMax and temp >= tempMin:
|
||||||
|
print("Rien à signaler")
|
||||||
|
temp = int(input())
|
||||||
|
|
||||||
|
print("Alerte !!")
|
16
zone.py
Normal file
16
zone.py
Normal file
@ -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)
|
13
zone2.py
Normal file
13
zone2.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
nbJetons = int(input())
|
||||||
|
|
||||||
|
for loop in range(nbJetons):
|
||||||
|
jetonX = int(input())
|
||||||
|
jetonY = int(input())
|
||||||
|
|
||||||
|
if (jetonX >= 0 and jetonX <= 90) and (jetonY >= 0 and jetonY <= 70) and (jetonX >= 20 and jetonX <= 50 and jetonY >=20 and jetonY <= 45):
|
||||||
|
z = "Zone jaune"
|
||||||
|
if (jetonX >= 10 and jetonX <= 85) and (jetonY >= 10 and jetonY <= 55):
|
||||||
|
z = "Zone bleue"
|
||||||
|
|
||||||
|
|
||||||
|
print(z)
|
Loading…
x
Reference in New Issue
Block a user