Functions
- Function is a reusable block of code
- Syntax
def <name_of_function>(arg1, arg2...):
...
...
...
return <value>
- Lets write a function to determine
- if the number is even or odd:
- return True if the number is even, False otherwise
- if the number is prime or not
- return True if the number is prime, False otherwise
- if the number is even or odd:
- Refer Here for functions demonstrations
Lists in python
- Refer Here for list examples
- Refer Here or few activities done on list
Docstring
- Refer Here for docstring
- Refer Here for Google python styling guide
references:
- Useful packages
- Snoop
- heartrate
Writing pythonic code
- Refer Here for sample pythonic