03 - Built-In Functions in Python

Опубликовано: 31 Август 2026
на канале: Aaron J Newman
745
11

We learn about some basic functions built into Python, and how to get help on functions.

Summary:
Functions are Python commands that return a result
Commonly-used built-in functions include `max`, `min`, and `round`
A function may take zero or more arguments
Functions may only work for certain (combinations of) arguments
Functions may have default values for some arguments
Fix syntax errors by reading the source code, and runtime errors by tracing the program's execution
Use the built-in function `help` to get help for a function
The Jupyter Notebook has two other ways to get help
use a `?` followed by the function name
position cursor over command name and press the `shift` + `tab` keys
Python reports a syntax error when it can't understand the source of a program
Python reports a runtime error when something goes wrong while a program is executing

From the course, NESC 3505 Neural Data Science, by Aaron J Newman, Dalhousie University, Halifax, NS, Canada.

All course videos are here: https://bit.ly/neural_data_science_vi...

Textbook is available here: http://neuraldatascience.io/intro.html

This lesson adapted from Software Carpentries: http://swcarpentry.github.io/python-n...