Hi, my name is beatbox4108. This time, I would like to write an introduction to python3. Since I am a beginner of qitta, please forgive the notation that is difficult to see.
Beginners in programming and trying to learn python Teachers who want to use python in the field of education but do not know how to explain
python3 is installed on your pc. Understand how to use the development environment.
Save the following content as test.py and try running it.
test.py
print("HelloWorld")
result:
HelloWorld
Yes. It seems like you'll hear a voice saying "I know" __, but it's still __ good source code __.
The kind of `print``` that we just used is called the
function
. ```print```The contents of the parentheses behind```argument```It's called. The arguments are enclosed in ```" ```, which will be explained later. I will explain how to use the
`print``` function that you will use from now on.
print(Argument 1,Argument 2...)
Now that you know how to use the `` `print``` function, let's do four arithmetic operations.
print(41+8)
print(41-8)
print(41*8)
print(41/8)
The following calculations are written in the order of `addition-> subtraction-> multiplication-> division`
, but what are `*`
and `/`
? ..
The answer to this question is __ because there are no multiplication and division symbols on the __keyboard.
Division will result in an error if divided by 0.
ZeroDivisionError: division by zero
By the way, I will learn about advanced calculations next time.
This time it ends. Please look forward to the next time. Go to Table of Contents
Recommended Posts