The first condition, we use if.
The second to the second to the last, we use elif.
The last one we use else.


Designed bu Lu
The first condition, we use if.
The second to the second to the last, we use elif.
The last one we use else.


1.Import modules or libraries

actually,import numpy is enough
but we always write numpy as np to save time because if we write a lot of codings , it can save us much energy.
For some library , you need to install it in cmd.write : pip install +the name of library
2.The basic information about numpy
zeros


ones


empty


eye



This time ,I have two parameters for my function.First one is name ,second one is age .


The first three lines is creating the function
The fourth line is calling functions
Here is the result

1.str vs. repr


2.input float




There are two basic output that I will introduce today.First one is float and next one is int.
Int:Only have the numbers before the decimal point.
Float:Can have the numbers after te decimal point
Accoring to the zen of python, I conclude it into two parts:
First: The simper the better
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Second: understand your code and let others understand easily with your comments
Special cases aren’t special enough to break the rules.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea — let’s do more of those!
