To add a formula in Google Sheets, click the cell where you want the answer, then choose one of the hundreds of functions.
Before you can use these scripts, you will need to generate a 'credentials.json' from your Google Drive user, and then derive a 'tokens.json' that allows the Python scripts to connect long-term.