<style> .reveal { font-size: 33px; } </style> # COMP1010 ## 2.1 - Python Introduction --- ## Why not just use spreadsheets? * No clear sequence * Hard to isolate and identify the source of errors * Can't automate testing * Limited functionality Note: * No clear sequence -> hard to tell which lines depend on others -> hard to find errors/debug. * No GUI. * People might mess with the forumlae. * Nested IF statments can make it hard to see what's going on in one line. * Sometimes spreadsheets (especially Excel) crash --- Spreadsheets focus on the *what* and hide the *how*. For many applications this is the right choice, but... * Around 94% of spreadsheets contain errors ([citation](https://www.researchgate.net/publication/228662532_What_We_Know_About_Spreadsheet_Errors)) * For any given spreadsheet formula, there's a 1% chance it contains an error ([citation](http://tuck-fac-cen.dartmouth.edu/images/uploads/faculty/serp/Errors.pdf)) * [An example spreadsheet with a bug](https://docs.google.com/spreadsheets/d/1iC3K7gLN6C_9aWXSRvM4h5ZFdis7r7RDsFxwtknTDqE/edit?usp=sharing) Even if something *can* be done with spreadsheets, there is still benefit in doing it in a programming language (like python) --- ## Colab Documents Who knows if I'll ever use slides again? --- ## Changing the value in variables ```{python} x = 5 x = x + 1 ``` ![](https://i.imgur.com/ocetUj4.png) --- ## Changing the value in variables ```{python} x = 5 x = x + 1 ``` ![](https://i.imgur.com/41hywR4.png) --- ## Changing the value in variables ```{python} x = 5 x = x + 1 ``` ![](https://i.imgur.com/DAkSfTE.png) --- ## Feedback Lecture: 2.1 Python Introduction ![](https://i.imgur.com/5FKvgmw.png) [Link to feedback form](https://forms.gle/NdAhw7ZMJ2eBEydd7)
{"metaMigratedAt":"2023-06-16T00:38:05.755Z","metaMigratedFrom":"YAML","title":"2.1 - Python Introduction","breaks":false,"slideOptions":"{\"transition\":\"slide\"}","contributors":"[{\"id\":\"969c3c3d-0ef4-4f08-b22a-2f2b8951224b\",\"add\":2341,\"del\":445}]"}
    273 views