Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédenteDernière révisionLes deux révisions suivantes |
python:bases:fonction [2022/10/28 12:08] – phil | python:bases:fonction [2024/02/29 08:39] – [Python - Les fonctions] phil |
---|
===== Python - Les fonctions ===== | ===== Python - Les fonctions ===== |
| |
[Mise à jour le : 28/10/2022] | [Mise à jour le : 29/2/2024] |
| |
* **Sources** | * **Sources** |
| |
* **Ressources** | * **Ressources** |
* <html><a href="https://www.pythonmorsels.com/built-in-functions-in-python/" target="_blank"><strong>Fonctions intégrées Python à connaître</strong></a></html> | * <html><a href="https://www.pythonmorsels.com/built-in-functions-in-python/" target="_blank">Fonctions intégrées Python à connaître</a></html> |
* **Real Python** : <html><a href="https://realpython.com/python-main-function/" target="_blank">Defining Main Functions in Python</a></html> | * **Real Python** : <html><a href="https://realpython.com/python-main-function/" target="_blank">Defining Main Functions in Python</a></html> |
| |
| |
=== 1.1 Forme simple de la déclaration et de l'appel (ordonnée)=== | === 1.1 Forme simple de la déclaration et de l'appel (ordonnée)=== |
> Dans cette forme, les arguments sont dits:"positionnels" car leur position lors de l'appel doit correspondre à la position des paramètres dans l'en-tête de la fonction. | <callout type="info" icon="true">Dans cette forme, les arguments sont dits:"**positionnels**" car leur position lors de l'appel doit correspondre à la position des paramètres dans l'en-tête de la fonction.</callout> |
| |
<code python *.py> | <code python *.py> |
* <html><a href="https://realpython.com/python-lambda/" target="_blank">How to Use Python Lambda Functions</a></html> | * <html><a href="https://realpython.com/python-lambda/" target="_blank">How to Use Python Lambda Functions</a></html> |
* <html><a href="https://realpython.com/run-python-scripts/" target="_blank">How to Run Your Python Scripts</a></html> | * <html><a href="https://realpython.com/run-python-scripts/" target="_blank">How to Run Your Python Scripts</a></html> |
| * <html><a href="https://realpython.com/python-sum-function/" target="_blank">Python's sum(): The Pythonic Way to Sum Values</a></html> |
| * <html><a href="https://realpython.com/len-python-function/" target="_blank">Using the len() Function in Python</a></html> |
| * <html><a href="https://realpython.com/python-min-and-max/" target="_blank">Python's min() and max(): Find Smallest and Largest Values</a></html> |
| * <html><a href="https://realpython.com/python-range/" target="_blank">The Python range() Function (Guide)</a></html> |
| |
---- | ---- |