From 5253473b021518ca9ef70db28e59a6034f02ddbb Mon Sep 17 00:00:00 2001 From: benpeterdalley Date: Mon, 15 Oct 2018 18:38:01 +1100 Subject: [PATCH] Indentation and grammar (#19209) * Indentation and grammar - I added a sentence about indentation, which is essential for the code to be contained in the function - Neatened up the grammar in the list. * Remove commas --- client/src/pages/guide/english/python/functions/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/pages/guide/english/python/functions/index.md b/client/src/pages/guide/english/python/functions/index.md index 2e9106abeb..1543efa7f0 100644 --- a/client/src/pages/guide/english/python/functions/index.md +++ b/client/src/pages/guide/english/python/functions/index.md @@ -17,9 +17,9 @@ In Python, a function definition has the following features: 1. The keyword `def` 2. a function name -3. paranthesis'()', and within paranthesis input parameters,although the input parameters are optional. +3. paranthesis'()', and within paranthesis input parameters,although the input parameters are optional 4. a colon ':' -5. some block of code to execute +5. some block of code to execute (that must be indented relative to the definition statement) 6. a return statement (optional) ```python @@ -126,6 +126,6 @@ result = s(1, 2) print(x) # error - x is not defined print(double(4)) # prints 8 ``` --Python interprets the function block only when the function is called and not when the function is defined.So even if the function definition block contains some sort of error,the python interpretar will point that out only when the function is called. +- Python interprets the function block only when the function is called and not when the function is defined.So even if the function definition block contains some sort of error,the python interpretar will point that out only when the function is called. ### More Information: - Python 3 Docs: Defining Functions