From d15b47d5a0a58515b64e2f57d4b6ab2b86e404be Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Wed, 5 Feb 2025 16:53:27 -0700 Subject: Renamed tutorials and updated links in tutorial/readme.md --- tutorials/3.x_Functions.md | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 tutorials/3.x_Functions.md (limited to 'tutorials/3.x_Functions.md') diff --git a/tutorials/3.x_Functions.md b/tutorials/3.x_Functions.md deleted file mode 100644 index e4c9874..0000000 --- a/tutorials/3.x_Functions.md +++ /dev/null @@ -1,29 +0,0 @@ -# Functions - -Like a traditional mathematical functions, python functions can take an input, process it, and give an output. Functions are blocks of code that is run everytime it's called. This allows us to re-use code. - -Functions are defined by using the def keyword. Reminder: it is important to indent all code inside the function to signify the end of the function. - -## Creating a function with no input -This is useful if you need to re-use code without having to copy paste the block. - -``` - def function_name(): - print("This is from a function") -``` - -## Creating a function with one input - -``` - def function(x): - print(x + " is best") -``` - -## Returning values from a function -Let's make a - -``` - def function(x, b): - y = 3*x+b - return y -``` -- cgit v1.2.3