How to call a function in python?
Answers
Answered by
7
⭕HØLA DEAR⭕
✏When you call a function, you are basically just telling the program to execute that function. So if you had a function that added 2 no. such as:
✏You would call the function like this:
✏Which would return 8.You can put any 2 numbers in the parentheses in this case. You can also call a function like this:
✏Which would set the variable answer equal to 11 in this case.
❤.HOPE IT HELPS.❤
Answered by
12
▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬
♥️____________________________
step 1 Declare the function with the keyword def followed by the function name.
Step 2: Write the arguments inside the opening and closing parentheses of the function, and end the declaration with a colon.
Step 3: Add the program statements to be executed.
♥️____________________________
▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬
Similar questions