ConvertQCM/C3/codes/q14_11.py
2025-08-26 18:58:56 +02:00

10 lines
No EOL
262 B
Python

def ajoute(stock,element,quantite):
if element in stock:
stock[element] = stock[element] + quantite
else:
stock[element] = quantite
stock = { 'clous': 14, 'vis': 27, 'boulons': 8,
'écrous': 24 }
ajoute(stock,'vis',5)
ajoute(stock,'chevilles',3)