# Define functions with def def function_name(function_argument_1, function_argument_2):
# Function body multiplied = function_argument_1 * function_argument_2
# Return value - What comes out of the function return multiplied # Call the function on some inputs after it has been defined: function_name(5, 10) # Set a default function argument value with = def combine_strings(word1 = "Hello", word2 = "World", sep = " "):
return word1 + sep + word2 combine_strings() combine_strings("Data", "Daft", sep = "") # Use the output of one function call as input to another: combine_strings(combine_strings("Data", "Daft", sep = ""), "Rules!")
That was extremely helpful, I'm currently studying IT and was stuck with this in the textbook, this makes more sense I'll subscribe to your channel as your explanation was well structured.
# Define functions with def
def function_name(function_argument_1, function_argument_2):
# Function body
multiplied = function_argument_1 * function_argument_2
# Return value - What comes out of the function
return multiplied
# Call the function on some inputs after it has been defined:
function_name(5, 10)
# Set a default function argument value with =
def combine_strings(word1 = "Hello", word2 = "World", sep = " "):
return word1 + sep + word2
combine_strings()
combine_strings("Data", "Daft", sep = "")
# Use the output of one function call as input to another:
combine_strings(combine_strings("Data", "Daft", sep = ""), "Rules!")
That was extremely helpful, I'm currently studying IT and was stuck with this in the textbook, this makes more sense I'll subscribe to your channel as your explanation was well structured.
thanks. I didn't need a guy to read the pages for me tho. I was expecting you would show "how to make a function" instead of reading this document.
what a strange complaint
🤣🤣
Great explanation, made it much easier to understand!
Please make a video on yield I don't understand how it works, would really appreciate it
That was a good lesson. 💪🖥️👨💻👩💻
Thank you very much this video helped me. i'll come back to this comment when i get accepted into WTC
hi, im new to python, i want to calculate ittrative calculation , using def function..do u have any related video relateed to that
for hello world isn't it easier to just use print ('Hello, World!') ? why use a function to do this?
nice efforts
Thank you!
thank you
nuevo sub