Python for super beginners Python #functions 1

environment windows7 (I want a Mac Book Pro 16inch) Visual Studio Code chrome python ver3.8.3

This article is written for beginners in programming and Python.

Function 1

Function ... Is that what you learned in junior high school? Or is it delicious like mackerel?

Yes, the correct answer is like that I learned in junior high school.

func.py


y=f(x)

Nostalgia makes my heart warm. So what is a function? According to weblio, what is a function?

Function How to read: Function [English] function A function is a set of mathematical formulas or instructions that perform a certain amount of calculation on an input value and return the processing result according to the input value.

weblio

It is that. I have a lot of memories back. However, it is still difficult to understand, so let's change the words as follows.

function How to read: Function [English] function A function is a set of mathematical formulas or commands that perform a certain amount of cooking on an input ingredient and return a cooking result according to the input ingredient. ..

To put this in a simpler analogy, I think we can say this.

1. Put ingredients in staub

First, put the ingredients in the staub (pot). Potatoes, carrots, meat, roux, etc.

2, put on fire cooking

Heat the pot to cook the ingredients in the staub.

3, it becomes a cooking called curry

Yes. The delicious curry cooking is ready.

In other words y=f(x) This is

Cooking = Cooking (Ingredients)

It's rough, but let's replace it. If you cook the ingredients, it becomes a cooking.

Well, based on this, I will go next.

Cooking = Cooking (Ingredients)

Cooking is a variable. Ingredients is an argument. Cooking is a function. This is a Python function.

Variable = function (argument)

Continue

Recommended Posts

Python for super beginners Python #functions 1
Python #function 2 for super beginners
Python #list for super beginners
Python for super beginners Python # dictionary type 1 for super beginners
Python #index for super beginners, slices
Python #len function for super beginners
Python #Hello World for super beginners
Python for super beginners Python # dictionary type 2 for super beginners
Python Beginner's Guide (Functions)
Let's put together Python for super beginners
python textbook for beginners
OpenCV for Python beginners
Python for super beginners Python for super beginners # Easy to get angry
Easy understanding of Python for & arrays (for super beginners)
About Python external module import <For super beginners>
Learning flow for Python beginners
Python3 environment construction (for beginners)
Basic Python grammar for beginners
100 Pandas knocks for Python beginners
Keyword arguments for Python functions
~ Tips for beginners to Python ③ ~
How to convert Python # type for Python super beginners: str
Python functions
Python # How to check type and type for super beginners
Azure Functions: Try Durable Functions for Python
Python Exercise for Beginners # 2 [for Statement / While Statement]
<For beginners> python library <For machine learning>
Beginners use Python for web scraping (1)
[Python] Reasons for overriding using super ()
Run unittests in Python (for beginners)
Beginners use Python for web scraping (4) ―― 1
How to convert Python # type for Python super beginners: int, float
2016-10-30 else for Python3> for:
python [for myself]
INSERT into MySQL with Python [For beginners]
[Kaggle for super beginners] Titanic (Logistic regression)
Roadmap for beginners
#Python basics (functions)
[Beginner] Python functions
[Python] Read images with OpenCV (for beginners)
WebApi creation with Python (CRUD creation) For beginners
Beginners practice Python
Python Easy-to-use functions
Python beginner's note
Atcoder standard input set for beginners (python)
Python basics: functions
[For beginners] Try web scraping with Python
A textbook for beginners made by Python beginners
The fastest way for beginners to master Python
Causal reasoning and causal search with Python (for beginners)
For new students (Recommended efforts for Python beginners Part 1)
Memo # 3 for Python beginners to read "Detailed Python Grammar"
Memo # 1 for Python beginners to read "Detailed Python Grammar"
Try to calculate RPN in Python (for beginners)
About Nim higher-order functions for Nim beginners written by Nim beginners
Memo # 2 for Python beginners to read "Detailed Python Grammar"
Memo # 7 for Python beginners to read "Detailed Python Grammar"
Introduction to Programming (Python) TA Tendency for beginners
Installing TensorFlow on Windows Easy for Python beginners
Memo # 6 for Python beginners to read "Detailed Python Grammar"
How to make Python faster for beginners [numpy]