ENG202 - Introduction To Python
ENG202 - Introduction To Python
Brief Introduction to
Python
https://www.w3resource.com/python/python-syntax.php
https://www.w3resource.com/python/python-syntax.php
https://www.w3resource.com/python/python-syntax.php
https://www.w3resource.com/python/python-syntax.php
https://www.w3resource.com/python/python-syntax.php
Input
Water temperature, tw
Yes
tw > 24
No
Great, jump in!
Stop
Input
Water temperature, tw
No Yes
tw > 24
No
tw > 20
Yes
Do not swim, Not bad, put Great,
too cold! your toe in first! jump in!
Stop
The while loop runs as long as the expression (condition) evaluates to True
and execute the program block.
The condition is checked every time at the beginning of the loop and the
first time when the expression evaluates to False, the loop stops without
executing any remaining statement(s).
i=0
i=1
i=2
j=0 1 2
https://www.pythoninformer.com/python-libraries/numpy/index-and-slice/
i=0 i=1
i=1 i=2
j=0 1 2
i=2
j=0 1 2 a2[2,1] = a2[i=2, j=1]
https://www.pythoninformer.com/python-libraries/numpy/index-and-slice/
Row slicing:
https://www.pythoninformer.com/python-libraries/numpy/index-and-slice/
arguments
return values
calling function