Back to Browse

Scope and namespaces in Python Problem Solving w/Python Ch 5 Lecture 4

363 views
Sep 30, 2023
15:18

Do you want to learn to code? If you're a beginner, you're in the right place! This video is part of an introductory series that will teach you to program in the popular Python programming language. In this video, we learn about scope or name visibility -- how Python resolves a name in a program to its meaning. It's important to understand this concept, or you'll have difficulty writing large-scale programs and understanding the errors that you will inevitably write into your programs if you're unfamiliar with scope. This series of videos is suitable for beginners or experienced programmers who want to learn Python. Let's have some fun learning to program with Python! You can purchase the book that goes with this video series here, as an ebook: https://amzn.to/3oiWwOb Or textbook: https://www.barnesandnoble.com/w/problem-solving-with-python-margaret-stone-burke/1129539414?ean=9798986151311 You can practice with the globals and functions code from the video here*: https://codecheck.io/files/2308292315bo62i3t4ie8mj6t8qy7p8e1ta You can practice adding a main function to the simplified adventure game from the video here: https://codecheck.io/files/23082923193je1zr7fmm1eolczczy5g2aqn The github repository with all of the code examples for the book and these videos is here: https://github.com/ProfessorBurke/PythonProblemSolving If you want to earn credit for learning to code, take an online course at CCRI! These videos are part of the Programming Concepts course: https://ccri.edu/comp/ The picture of Margaret Hamilton, MIT software engineer, with the Apollo code, is in the public domain and was retrieved from: https://upload.wikimedia.org/wikipedia/commons/d/db/Margaret_Hamilton_-_restoration.jpg You can read more about that here: https://news.mit.edu/2016/scene-at-mit-margaret-hamilton-apollo-code-0817 Class diagram image retrieved from: https://upload.wikimedia.org/wikipedia/commons/0/00/ClassDiagramm1.jpg Attribution: Elena M, Public domain, via Wikimedia Commons Structure chart retrieved from: https://upload.wikimedia.org/wikipedia/commons/e/e7/CPT-Structured_Chart_Example.svg Attribution: Pluke, Public domain, via Wikimedia Commons *The CodeCheck system courtesy of Cay Horstmann, https://horstmann.com/codecheck/ 00:00 Where we've been and where we're going 00:40 Motivation 03:18 What is scope 03:51 What is a name 05:27 What is a namespace 06:20 Namespace rules 12:56 Moving all code into functions

Download

0 formats

No download links available.

Scope and namespaces in Python Problem Solving w/Python Ch 5 Lecture 4 | NatokHD