Python 3 - Programming for Beginners (2017)
4.5 (117 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
4,765 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Python 3 - Programming for Beginners (2017) to your Wishlist.

Add to Wishlist

Python 3 - Programming for Beginners (2017)

Learn Python Programming Using Mnemonics, Metaphors and the Science of Learning
4.5 (117 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
4,765 students enrolled
Created by Dylan Jorgensen
Last updated 5/2017
English [Auto-generated]
Current price: $10 Original price: $35 Discount: 71% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 11.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • The “why” of programming from code-free discussions using metaphors, mnemonics, discussions and interactive examples.
  • The “how” of programming from interactive code examples and explanation lectures. :)
View Curriculum
  • None. This is the Ellis Island of programming courses. It’s for beginners, busy huddled masses and people who yearn for a pay raise.

Separating "Why" From "How"

This course addresses all topics in two ways, first by having a no-code discussion explaining the “what” and the “why,” then we add code examples to demonstrate the “how.”

Why Lessons

  • Creative Right-Brained Visual Discussions

  • Often the creative right side of our brains use the excuse, “It’s too complicated.”

  • So our right-brain videos, use plain English discussions, stories and memory mnemonics to address the “why” of programming without letting the technical stuff get in the way.

How Lessons

  • Logical Left-Brained Explanations and Examples

  • Often the logical left side of our brains use the excuse, “What's the point?”

  • So our left-brain videos, use code examples and syntax explanations to address the “how” of programming.

Cutting-Edge Learning Methods

This course was built around several learning methods that take advantage of new discoveries from the science of learning. 

The Spacing Effect

  • Learning is faster when the studying is spread out over time.

  • So this course includes an easy-to-follow schedule (90 min. sessions, 3 days a week) that takes two months to complete.

  • The course is split into 3 chapters that start with a no-code, reading-friendly e-book written in Q&A style with mnemonics.

The Mnemonic Effect

  • Humans are wired to learn about real-life objects, but often in programming, learning is not hands on or visual.

  • Each concept we discuss is connected to a physical object that you have likely interacted with in real life and can imagine seeing, feeling, etc. 

The Metaphor Effect

  • Learning is faster when an instructor builds on associations that a student has already made.

  • This course uses visual/spatial mnemonics along with every programming concept. Each mnemonic is tied to a metaphor, so you can connect the discussion topics with physical objects to aid in memory retention.

Memory Palace

  • A Memory Palace works by imagining a place you know well and then putting the physical mnemonics we learned from the other chapter in your spacial memory.  

  • After the “what” and “why” videos, you will find bizarre stories that are all told in a single geographical location.

The Bizarreness Effect

  • The Bizarreness Effect is the tendency to remember bizarre material better than common material.

  • The stories are purposely designed to make absurd leaps of logic, anthropomorphize objects and generally address bizarre and unrealistic situations.

The Eureka Effect

  • The Eureka Effect describes the experience of suddenly understanding a previously incomprehensible problem.

  • To help increase this sensation, we learn passes. This approach lets the concepts build up in steps, but also allows the whole picture to come into focus slowly, as you learn about previous concepts on a deeper and deeper level.

  • We use two numbering systems for every lesson. The top number shows the breadth: how much progress you are making across topics. The bottom number shows the depth: how deep into a topic's complexity you are.

The Belief Effect

  • Studies show that students who are told they will do better on tests end up performing better, and vice versa.

  • This course is sprinkled with stories that humanize the life of a programmer, comparing programming to creative writing, sports and painting. Just as anyone can learn writing or painting skills, anyone can learn to code; this course keeps that perspective in focus.

Project-Based Learning

Each chapter ends with a review of dozens of working projects.

Projects: Writing

  • Automate Boring Songs: Prints out the whole “99 bottles of beer on the wall” song

  • Make Interactive Jokes: Interactively asks the user to be part of a snowman and vampire joke. The punchline is… wait for it…. “Frostbite.” :)

  • Randomly Pick Characters: Randomly chooses a letter out of a sentence

  • Identify Positions: Finds the second occurrence of a word in a sentence

  • Remove Vowels: Removes vowels from a sentence

  • Reverse a String: Takes in any text input “string type,” reverses it, then returns the reverse text string

  • Check for Palindromes: Checks any text input for a palindrome match, then returns a yes or no statement

  • Pluralize: Takes any single word and makes it plural

Projects: Numbers

  • Calculator Stuff: Performs basic arithmetic

  • Solve the Pythagorean Theorem: Solves the Pythagorean theorem with variables

  • Generate Random Numbers: Returns a random integer from a customizable range of numbers

  • Odd or Even Test: Returns a boolean response if a number is even or odd

  • Trig Homework: Calculates some trigonometric angles

  • Randomize a Guessing Game: A fun random guessing game you can play with a friend

Projects: Automation

  • Print the Fibonacci Sequence: Prints the Fibonacci sequence

  • Solve the FizzBuzz Problem: Solves the FizzBuzz problem just like at a real job interview

Projects: Oysters

  • Check if it's Dark Outside: Looks up the user’s location and time and then returns a statement saying if it’s dark outside or not

  • Read a Spreadsheet from the Internet: Uses the pandas module to load in a CSV file from the internet

  • Make a Progress Bar: A cool package that makes a progress bar while your computer is working on a loop that runs 10 million times

  • Scrape Jokes off a Website: A cool app that uses BeautifulSoup to scrape Victorian jokes off a website and display them in the console

  • Share Data through an API: Creates JSON for others to access

  • Make a Beautiful Chart: Generates random data points, then uses matplotlib package to display a colorful chart

My goal is to help you advance from beginner to job-ready programmer as fast as possible. Because it’s my first course, I am keeping the introductory price at less than $4 per hour, so sign up now!

Who is the target audience?
  • Anyone who is project managing a developer, wants technical career training or is simply curious about all the hoopla around programming.
Compare to Other Python Courses
Curriculum For This Course
55 Lectures
5 Lectures 34:29


  • Welcome to our first orientation video and thank’s for your purchase.

  • I am excited to engage with you, and remember you can D.M. me, post in Q&A boards or leave reviews and I will use that feedback to make this course better.


  • In this video we are going to get a high level overview of the unique learning methods the course was constructed around.  

  • Then I will end with a few recommendations to help you get the most out of your time.

The Spacing Effect

  • Wikipedia

  • Learning is faster when the studying is spread out over time

  • Cramming for 5 hours is not the same as 1 hour each day M-F


  • Student Schedule

  • Three months to complete

  • 90min sessions, 3 days a week

  • 3 months to complete

  • Consistency is the key


  • 3 broad chapters


  • Start of each chapter

  • No-code & reading friendly

  • Written in Q&A style

  • With short stories


  • End of each chapter

  • Review dozens of working projects

  • Pointing out the parts we learned about

Separating “What and Why” From “How”

  • This course addresses all topics in two ways: first by having a no-code discussion explaining the “What and the Why”, Then code examples that demonstrate the “How”

  • Right Brain “Why” Videos: Marked in Blue

    • These videos are marked in blue and do not contain any code, but instead are entirely english discussions, stories and metaphors. These videos address the same programming topics as the left brain videos but are designed to stimulate your creativity, and help you build an intuition for the what and why of programming.

  • Left Brain “How” Videos: Marked in Black

    • The left brain “How” videos are marked in black and contain code examples that I will talk through then demonstrate. The important things you should be looking to take away from these videos are the procedures, syntax, and logic.

  • Together, the goal of this overall structure is to prevent the right side of the brain from asking “What's the point?” and the left side of your braining saying “It’s too complicated”

The Mnemonic Effect

  • As humans we are wired to learn real life objects. But learning programming is not hands on or visual.

  • One problem is that with beginners everything is conceptual. Unlike learning to become a mechanic in an auto shop there is not wrench to look at, nothing to touch or imagine holding.

  • So we will use mnemonics to give that “real world” sense to the course.

Mnemonic Concepts

  • Each concept we discuss is connected to a physical object, you have likely interacted with in real life and can imagining seeing, feeling, and interacting with.

  • These will be presented in the “What & Why” videos during our discussions.

  • Try to use these objects in the real world to trigger the programming concepts. For example, every time you see a gas pump think about how the way it works in an analogy for function in programming.

The Metaphor Effect

  • Use associations and already in place mental scaffolding to learn faster.

Programming as Writing

  • I tried my best to tie each mnemonic to the metaphor that explains some kind of abstract similarity. Admittedly that kind of conversation will always be a work in progress so please post any metaphors or mnemonics you think of in the forums.

  • Also, we will treat programming as whole as a giant metaphor to writing.

  • It’s weird but even if we're not great writers, most people seem to have a sense for what a writer’s life is like. But the same is not true for programming.

  • Besides using metaphors throughout the course the sections themselves are also divided into 3 chapters:

    • Chap 1 - Nouns

    • Chap 2 - Verbs

    • Chap 3 - Stories

The Memory Palace

  • The Memory Palace (also known as the palace of loci) is a time-honored technique for memorization.

  • It works by imagining a place you know well and then putting the physical mnemonics we learned from the other chapter in your spacial memory.  

Memory Palace

  • After the “What and Why” videos you will find bizarre stories that are all told in a single geographical location. The place I chose a fun location is Las Vegas where I also happen to live.

  • The stories contain the mnemonic objects and hopefully will make it easy for you to walk through the space in mind and remember all of our topics.

Bizarreness Effect

  • Wikipedia

  • Bizarreness effect is the tendency of bizarre material to be better remembered than common material.

Crazy Stories

  • The stories are purposely designed to make absurd leaps of logic, anthropomorphize objects and generally address bizarre and unrealistic situations.

The Eureka Effect

  • Wikipedia

  • The experience of pleasure we get when we suddenly understanding a previously incomprehensible problem and a previously unsolvable puzzle becomes suddenly clear and obvious.

  • It’s also something we get a lot more of as we become more familiar with the material. I once heard knowledge described as a place where the rich get richer. I think that is true. One new fact for a an expert can result in a wealth of pleasure connections. Whereas one new fact for a novice and it’s just one new pointless thing to memorize.

  • Einstein described learning as an expanding circle. The bigger the circle the more parameters you have that is touching the unknown.

  • So try to keep in mind how rewarding it will be once you have built up all this knowledge. The pleasure you will feel from the eureka effect is something you will get a lot more of at the end.

Depth vs. Breadth

  • To help increase this sensation we learn passes, which lets the concepts build up in steps, but also allows the whole picture to come into focus slowly as previous concepts get deeper and deeper.

  • Each lesson in this course has two numbering systems:

    • The top number shows the breadth

      • This is how much progress you are making across topics

    • The second number show the depth,

      • This is how deep into a topic's complexity you are.

  • The blue “why” videos signify the end of the first pass.

  • This will allow you to see the full picture sooner. Although it will be fuzzy at first seeing the whole picture, which will naturally lead to right questions you should be asking yourself to piece everything together in a way that makes sense.

The Belief Effect

  • The belief effects is simply knowing deep down you can become a programmer.

  • If you believe you can or can’t you're right, and just realizing that it’s just a matter of time. Maybe it’s 100 hours, maybe 200 hours but it’s something anyone can develop if they are just willing to put the time in.


  • I want to shake that thought that you can't become a programmer. Even if it turns out not to be your path in life, you're certainly capable of doing it and becoming one

  • Myth 1: Girls are not good at math?

    • 50% of programer in India are girls, only 10% in the US?

    • It’s cultural only. End of story.

  • Programing is math?

    • Programming is not much more logical at its root than the logic at the base of every language on earth. You need to learn rules and syntax to form sentences. After that it’s a creative art just like writing, or painting.

Let's Get Started!

  • This belief effect will play out in a lot of way that you might not notice. So just take this time to remind yourself that you are capable, and there is nothing special about people who make a good living as programmers that you can’t achieve

Preview 08:15

What’s programming?

  • Programming is the action that results in softwares, algorithm or apps; in the same way writing is the action that results is books, stories and screenplays.

  • To be a good programer you need to learn two things: the first one is speak the language, the second is to communicate your goals clearly.

  • Computers are simple and reactive so learning to program is also about communicating clearly. Your goals must be broken down into real actionable steps and all steps must be accounted for.

How will that help me?

  • Once you learn, only a handful simple programming concepts and the ways they interact you can you layer them in creative ways to build really complex software.

  • Robots, self driving cars, apps, video games, websites, you name it.

  • Every industry from space travel to farming using software, and that software needs people like you and me to keep making it better.

What is Python ?

  • One of many programming languages to describe computer requests.

  • Just like English, French or Spanish are world languages you can use to describe what kind of food you want a waiter to bring Python is one of many languages you can you use to describe you want the computer to do.

Where did python get it’s name?

  • The name came from the Monty Python movies

How does it compare to other programming languages?

  • Python is currently the most popular introductory teaching language at top U.S. universities

  • It’s one of the most popular programming language in the world!

  • Uses white space tabs and generally english syntax for readability.

  • Has good extensions for people interested in web development, computer science.

  • It is open source and free to use.

What is the difference between classic Python and Anaconda Python?

  • Anaconda is a suite of tools, and packages that contains python inside of it.

  • Its aim is to simply simplify package management and deployment of python.

If I don’t end up a full time programmer are there any other benefits?

  • Yes, you will learn a very important logical way thinking.

  • Programming is all about breaking down abstract goals into specific action.

What is a jupyter notebook?

  • Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more.

What is a kernel?

  • A notebook kernel is a “computational engine” that executes the code contained in a Notebook document.

  • I only bring it up so you know if people talk about it does not matter to you at this point.

Why do we care about jupyter notebooks?

  • Easy to share code over the web.

  • Easy to run code line by line. This helps with understanding.

  • When combined with anaconda handles many of the complicated install issue that slow down beginners.

What kinds of extensions are available?

  • Extensions I use are "Code Font Size", "Collapsible Headings", "Keyboard Shortcut Editor", and "Table of Contents".
Preview 05:30

It sucks when someone can't get started with programming just because it’s hard to install everything. It’s like telling someone they can’t write their first story until they can fix the printer. So in this section we do our best to simplify getting started by using every shortcut available to get you up and running with Python and Jupyter Notebooks.

This “how” lesson demonstrates:

  • How to install Python 3.6 and the Jupyter notebook on a Mac running OSX Sierra

Preview 11:11

It sucks when someone can't get started with programming just because it’s hard to install everything. It’s like telling someone they can’t write their first story until they can fix the printer. So in this section we do our best to simplify getting started by using every shortcut available to get you up and running with Python and Jupyter Notebooks.

This “how” lesson demonstrates:

  • How to install Python 3.5 and the Jupyter notebook on a PC running Windows
Preview 06:37

This “how” lesson demonstrates:

  • How we can code Python in a non traditional way using the cloud
Python From The Cloud (How)
5 Lectures 59:05

What’s a variable?

  • A variable is any characteristics, number, or quantity that can be measured or counted, think age, sex,  income or country of birth are variables because the value may change over time.

  • Technically reserved memory locations with an ID locator

  • For beginners I think it’s best to think of them as information tupperware that can scale to fit any object.

  • Variables are case sensitive and cannot start with a digit.

What are types?

  • Classifications of variables, grouped by memory usage and structure.

  • Therefore, by assigning different data types to variables, you can store integers, decimals or characters in these variables.

What is an object?

  • Everything is an object type, variables, functions, operators, etc...

  • Python is completely object oriented, and not "statically typed".

What is an objects identity?

  • Every object has an unique identifier called its identity.

  • An object’s identity never changes once it has been created, it’s the object’s address in memory.

What is mutability?

  • It’s a process. I think of it as evolution, but only making partial changes. Some part of the original creature must stay the same. Like the variable name in Python.

What is a variable's state?

  • State is term used to refer to this current variable's value.

How do we find it out if we don't know?

  • I tend to think of variable stats as analogous to emotional state.

  • Same person with different internal feelings dominating their thoughts.
Preview 08:26

This “how” lesson demonstrates:

  • How to create a variables.

  • How to check what type of variable is.

  • How to check if something is an object and find its object ID.

  • How to find the current state of a variable
Variables, Types, Objects, Mutability & States (How)

What is scope? Variable scope?

  • When a name (also known as variable) is used in a code block a scope defines the visibility. That variables visibility is considered that variables scope.

  • Scope identifies the boundaries that a variable can found within.

What defines the rules of Scope?

  • There is a concise set of rules that can be summarized in the acronym LEGB.

  • These rules are specific to variable names, not attributes. If you reference it without a period, these rules apply

What are the LEGB rules?

  • L, Local — Names assigned in any way within a function, and not declared global in that function.

  • E, Enclosing function locals — Names in the local scope of any and all enclosing  nesting functions, from inner to outer.

  • G, Global (module) — Names assigned at the top-level of a module file, or declared global in a def within the file.

  • B, Built-in (Python) — Names preassigned in the built-in names module : Examples are open, range & SyntaxError.

What is a namespace?

  • A namespace is a way to see what names/variables we have in our scope.

  • A namespace, is an fenced in area with a list of all available names in our current scope.

  • A name can also map to a function or any other python object so importing a module or function can bring more names along with it so your name spaces holds the functions, classes and vars your module has access to.

  • In Python, each package, module, class, function and method function owns a "namespace" in which variable names are resolved.

  • There's also a global namespace that's used if the name isn't in the local namespace.

  • To use libraries you have to load them into you name space.

How do I see what my namespaces are?

  • Locals() prints local variables

  • Globals() print global variables, The built in globals function returns a dictionary containing all the variable names Python knows about.

  • The python magic %var

What are public, private and protected variables? Related to classes?

  • Public variables, are variables that are visible to all classes.

  • Private variables, are variables that are visible only to the class to which they belong.

  • Protected variables, are variables that are visible only to the class to which they belong, and any subclasses.

Single Underscore?

  • Names, in a class, with a leading underscore are simply to indicate to other programmers that the attribute or method is intended to be private. However, nothing special is done with the name itself.

Double Underscore (Name Mangling)

  • Identifiers with double_underscores get their underscores replaced with classnames.

  • Methods that start like __cowboyhat (at least two leading underscores, at most one trailing underscore) is textually replaced with _classname__cowboyhat.
Scope (Why)

This “how” lesson demonstrates:

  • How the is syntax looks that contains variables into a scope.

  • How to print all of the active names in our name spaces to our console.

  • How the syntax looks that classifies a public-private or protected variable.
Scope, Namespaces, Public, Private & Protected Variables (How)

Welcome to our first mnemonic walkthrough

Consider these section wrap up videos to be 100% optional.

I personally find it fun to make stories in a visually connected location to help lock in newly learned mnemonics. But I know this kind of thing is more helpful for some than others so I don't’ expect these walkthroughs to appeal to everyone.

That said, If it is your thing I recommend trying to imagine this whole story again tonight just before you fall asleep. You most likely will be able to remember the mnemonics but then try to challenge yourself to see if you can remember the concepts each mnemonic is referencing.

Once that becomes natural, it will be hard not to make the jump in everyday life. From that point on it’s easy sailing because you will be “learning amazing concepts, through effortless associations”

In this walkthrough we heard the story of how the Tron Light Cycle was used to build a wall between the US and Mexico.

Then we met a group of shady politician Python snakes and learned about their plans to move to Jupiter.

After that we met a butterfly who had a hard day at work, and a Ninja Turtle bartender that had all the right answers for him.

Along with a pair of professional streakers who came up with an ingenious plan to use a “hello my name is” name tag to sneak back into their local football stadium, and do what they were put on this earth to do… streak.

And finally we ended with a heart warming tale of how a group of penguins escaped their zoo enclosure by acting low class.

Preview 13:53
Singles Types
4 Lectures 47:37

What is casting?

  • Casting is when you convert a variable value from one type to another.

  • This is, in Python, done with functions such as int() or float() or str().

What is dynamic typing?

  • Under the right circumstances casting can be triggered automatically in the background.

  • A language has dynamic typing when it does not associate values strictly with a specific type, but it is designed to "decide" what the type of a value should be at runtime, based on how you are attempting to use it.

What is an integer type?

  • An integer is just a number without a decimal part (for instance, -17, 0, and 42 are all integers, but 98.6 is not).

What is a float type?

  • A float is a number with that display the fraction using decimal point.

  • For instance 98.6 but not 42

What is a string?

  • A string is usually a bit of text you want to display to someone, or "export" out of the program you are writing. Python knows you want something to be a string when you put either " (double-quotes) or ' (single-quotes) around the text.

What is escaping a string?

  • The backslash ( \ ) character is used to escape characters that otherwise have a special meaning, such as newline, backslash itself, or the quote character.

What does the repr function print? It looks similar to a string?

  • The goal of str is to print something readable, the goal repr is to print something you could cut and past back into python and use.  

What is unicode?

  • In Python 3.x, Python creates string as unicode by default.

  • Unicode is an international encoding standard for use with different languages and scripts, by which each letter, digit, or symbol is assigned a unique numeric value that applies across different platforms and programs.

  • UTF-8 is used by 87.8% of all the websites

  • They actually are arrays of integers
Preview 09:56

This “how” lesson demonstrates:

  • How to recognize the difference between an integer and a floating-point number.

  • How to use functions to round numbers up or down.

  • How we can import constants into our code.

  • How to work with boolean math.

  • How to print numbers out to the console in ways that are aesthetically pleasing
Preview 10:27

This “how” lesson demonstrates:

  • How to work with the type of string.

  • How we can use escape characters to specify actions outside of a string.

  • How we can use the Repr method to see how the computer thinks about text.

  • How to access string methods and show off some cool things we can with them.
Str, Escape, Raw, Repr, Encoding, Method (How)

Memory Palace: Python Single Types (Section Wrap Up)
Group Types
5 Lectures 01:00:05

What’s a list?

  • Lists are a python programming construct that works like a list of items, or an array.

  • Lists are written within square brackets [ ]

  • Lists can contain any object separated by a comma.

  • Lists keep their order. (As opposed to collections and dictionaries)

  • Lists are a sequence of elements.

What’s a matrix?

  • A matrix is a nested list, like a list list of lists

  • It’s almost always is made of numbers.

  • At times it might make the most sense to think of them as 2D or 3D structures.

What are tuples?

  • Tuples are immutable lists, that do keep their order.

  • Tuples are immutable (locked, unchangeable or sturdy) lists.

  • Tuples and lists are both "sequences", that have elements that we're able to pull out.

What is the set data type?

  • Sets are lists but without duplicate entries and unordered.

  • There is no order function

  • Every item in the set can only occur once.

What is a dictionary?

  • They have two parts a key & and value.

  • They are made with curly braces, commas and colons.

  • Each key is separated from its value by a colon (:), the items are separated by commas, and the whole thing is enclosed in curly braces.

  • The values of a dictionary can be of any type, but the keys must be of an immutable data type such as strings, numbers, or tuples.

  • Dictionary's do not keep an order similar to a set and unlike a list

What is a hash table?

  • A python dictionary uses a hash table, which is a data structure that uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found.
Preview 09:47

This “how” lesson demonstrates:

  • How to work with the list type.

  • How to create incredibly long lists with only one method called a range.

  • How to work with lists that are nested inside of list, especially when they look like math matrices
Preview 19:57

This “how” lesson demonstrates:

  • How to work with a list like immutable type called a Tuple.

  • How to work with sets.

  • How to do venn diagram style math with sets
Tuples & Sets (How)

This “how” lesson demonstrates:

  • How to harness the the power of key and values pairs,.

  • How to work with the type dict.

  • How to use some of the types best methods.

  • How to import and use a new dictionary type with a few more powers called DefaultDicts.
Dicts, Dict Loops & DefaultDicts (How)

Chapter Review
3 Lectures 52:27


  • Even though this section did break from concept of informational nouns because it was essential to getting up and running with the tools we would be using for the rest of the course.

  • The very first video did address one important higher level concept and that was programming as whole.

  • We talked about how programming is actually more about way of thinking than anything else.  We need to focus on the clarity requests, and finding creative ways to make sure they layer into logical conclusions.


  • The learning objective for the mutability section is to get your head around the process of informational evolution and understand a very important python object called a variable.

  • Code reads like a book from top to bottom, we can think of our variables as the characters of a story and the verbs from the next chapter as the situations that change our character.

  • We learned should be thought of as taking place over time. Concepts like scope, access and types we're all meant to be seen as ways to describe characteristics that are only relevant for the point in time where we look at them.

Type: Single

  • In these next two sections we learned expanded on our understand that variables are like shot glasses.

  • We learn that even though every shot glass has a unique ID they also have a more abstracted level of share properties called types. I think of these as different sizes of glasses sorted on a shelves at store.

  • The learning objective for this “single type” section was to get comfortable with a few of the most basic python types that would be the the smallest size,. for simple reason they can only hold one value at a time like an integer or a float.

  • Also I should note that we talked about text here because I think of text as a single word or sentence but it's also valid to argue that it should have been covered with our group types instead because individual characters can be thought of as an array.

Type: Groups

  • The learning objective for this “group type” section is to get comfortable with a few of the most basic python types for lists, matrices, tuples, sets and dictionaries.

  • We can think of these variable types as much bigger,  in fact not only are they bigger they are made of a kind of flexible material that allows them to grow like a balloon to any size.

  • Our group types can hold sequences or groups of individual elements and these elements can be retrieved, sorted, or individually removed or added.
Preview 06:56

3 Lectures 36:10

What is an operator?

  • An operator is a symbol represents an action.

  • For example *  is an arithmetic operator that represents multiplication.

What are Arithmetic Operators?

  • They are the same operations that you learned in high school math.

  • They also follow the traditional order of operations.

What is a comparison operator?

  • These operators compare the values on either sides of them and decide the relation among them. They are also called Relational operators.

  • == if the objects referred to by the variables are equal on the surface level.

What are assignment operators?

  • Assignment operator insert new value to a variable.

What are identity operators? (is)

  • Identity operators compare the memory locations of two objects.

  • “is” will return True if two variables point to the same object.

What are equality operators and how are they related? (==)

  • == if the objects referred to by the variables are equal.

What are membership operators?

  • Membership operators test for membership in a group, this can apply to lists, dictionaries, strings, tuples, etc.

What are logical operators?

  • Logical operators test basics Truth statements. Think of the words “and” and “or”

  • For example this statement is False

    • There is a prize behind door number 1 and door number 2

  • This statement is True

    • There is a prize behind door number 1 or door number 2

What is the order of operations in computer programming?

  • It’s like “order of operations” from algebra but with more stuff included.

What is the order of operations hierarchy in Python?

  • The following table with a non exhaustive lists of python operators from highest precedence to lowest.

Preview 09:28

This “how” lesson demonstrates:

  • How We can use arithmetic operators to do math on number types.

  • How we can use comparison operators light greater than and less than to compare numbers.

  • How to use more assignment operators than just our basic equals sign.

  • How we can use membership operators to find out if something is inside of a group.

Arithmetic, Comparisons, Assignment, Identity, Equality & Membership (How)

Memory Palace: Python Operators (Section Wrap Up)
5 Lectures 01:01:49

What’s a conditional?

  • Python keywords that evaluate a condition then return a boolean (“True" or "False") response.

What’s the point?

  • Conditionals allow us to put our actions into context.

What keywords does python give us to specify conditions?

  • If, else and elif

What are decision trees?

  • Decision trees are when we get when we stack up lots of conditions.

  • Even though each condition is a made from simple logic when stacked together they can bring you to amazingly complex outcomes.  

What is flow control?

  • Flow control is an associated but boarder topic about how information moves through systems (like decision trees).

  • For example in software that routes incoming calls flow control could refer to the process of options the caller has and where they end up.
Conditionals (Why)

This “how” lesson demonstrates:

  • How a computer can use conditionals to make decisions.

  • How we can use the 3 keywords python gives us to create these conditionals.

  • How they can build up into more complex decision trees.
Conditionals, Keywords, Decision Trees (How)

What is a bug?

  • A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

Bugs vs. Features?

  • Bugs can come in shades of grey if you don’t clearly define the functionality your want to achieve. Sometimes bugs become features.

What is debugging?

  • Debugging is the processing of smoothing out the bugs, once you have a clear definition of the functionality you want.

  • Debugging can be as simple as a print command that prints variable at certain points of a program or as complicated as introducing new complex debug code to test for subtle changes between your expected outputs and the true outputs.

What is a stack trace?

  • A stack trace is a report that reports at certain points in time during the execution of a program.

  • A stack trace is a list of the method calls that the application was in the middle of when an error occurred. (aka Exception was thrown.)

How to Read the Stack Trace?

  • Not every bug will have a stack trace, but many do and if they do then this means the bug is not on the surface but instead wrapped up deeper down.

  • Deeper down could mean the order the code is compiled, or in a deepers scope like a function, or even in open sources modules imported.

  • So instead of starting at the top of our code we just start with our topmost method call and often this will get our attention close enough to the problem we can work through the rest.

What are exceptions?

  • Imagine if somebody passed in a string argument when your function only works with integers, exception handling is how you deal with it.

What’s exception handling?

  • Exception handling is about making sure that you have variables that don't break your code in a way that is similar to our conditional section before.

  • Exception handling is the process of responding to an unwanted action during either compile time or runtime.

What does the keyword raise do?

  • Raise is a way to override the default exceptions in the way we want and display the information we want to the user.

  • Raise allows us to define our own type of exception errors.

What does the keyword finally do?

  • We can use the finally statement to ensure that a block of code is closed at the end of the file even if there is exception that causes the interpreter to break

  • A time when you might want to do this is when you need to close out an open file at the very end of your program know matter what.

Is there a way to group errors into runtime and compile time?

  • Compile time errors happen when we feed a bunch of text to the compiler to convert it to machine code.

Why: Python Debugging, Stack Trace, Exception Handling, Try / Except & Raise? (W

This “how” lesson demonstrates:

  • How we can think about the difference between a bug and a feature.

  • How we can look through an error's stack trace to zoom in on a bug origin.

  • How we can identify and work with exceptions.

  • How to use Python’s debugging key words like “try”, “except”, “finally” and “raise”.
Debugging, Stack Trace, Exception Handling, Try / Except & Raise (How)

Memory Palace: Python Conditionals (Section Wrap-Up)
6 Lectures 01:25:53

What is a loop?

  • Loops are in similar to the “if” conditional statements but they are continually run for as long as the condition stays True

What’s the point?

  • Saves time by separating out repeating logic.

What is breaking a loop?

  • Break statement can be used inside of a loop to stop the code from continuously executing before the while or for loops would normally complete.

Bonus Comment:

  • There is a style/type of programming called “functional programming.” and in a pure functional programming languages no loop construct is given. To code loop like logic they use a concept called “recursion”. We will learn more about that later.

What’s a for loop?

  • The for loop is used to repeat a section of code known number of times.

  • It’s a way to evaluate sets of varying lengths

  • It’s a control flow statement that allows a sequence to to be executed repeatedly.

  • Think “for each item”, do something.

What’s a while loop?

  • A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition.

  • The while loop can be thought of as a repeating “if” statements over a sequence.
Loops (Why)

This “how” lesson demonstrates:

  • How we can build loops to iterate over it a list applying logic to each element.

  • How to work with the various types of loops like the “for loop” and the “while loop”

  • How we can insert logic into a loop to stop it before all of the items are processed.

  • How we nest loops inside one another to automate more complex logic.
For, Types, While, Break & Nesting (How)

What’s the difference between “recursion” and “iteration”?

- When a function needs to call itself in order to solve a problem, is called recursion. Recursion means, "to run back" in Latin. 
- Iteration is a general term for taking each item of something, one after another. Any time you use a loop, explicit or implicit, to go over a group of items, that is iteration.

What’s the difference between Iterable objects and Iterator objects?
- They are both defined by general properties that we can use as a question to ask if a  Python object type has. But they are different properties so they ask different questions.
- If we want to know if an object is iterable we are asking, “can it be looped over?” Meaning anything that can appear on the right side of a for loop. Python lists, tuples, dicts and sets are all examples of inbuilt iterable.
- If we want to know if an object is iterator we are asking, “can it be run asynchronously?” Meaning it can be paused, then later remember where in the sequence it was paused then restart at that point. Think, list like objects that can pause and resume.

What's a generator?
- It’s a specific type of object in Python. 
- The term generator is an abbreviation for generator-iterators. 
- It's a special type of object that can be paused and restarted. 
- It holds the logic that it needs to do for each element separately,  so that they can be individually. 

What syntax is required?
- A special statement called "yield" is only used with generator functions.
- Python functions like next() & iter() can only be used on iterator objects that come from generators.

What’s a comprehension?
- It’s a system for shorthand notation that simplifies the syntax for working with certain constructions and types.
- They are most commonly used with group types like lists, and sets. 
- What object types can we use them with?
- They are most commonly used with group types.
- Lists, dicts, sets and generators.
Iterable objects and Iterator objects

Why: Python Recursion, Iteration, Iterable, Generators, Yield & Comprehensions?

How-To: Python Recursion, Iteration, Iterable, Generators, Yield & Comprehension

How-To: Python Comprehensions of generators, conditionals, operators, lists, dic

Why: Python Recursion, Iteration, Iterable, Generators, Yield & Comprehensions?
5 Lectures 01:19:28

What’s a function?

  • It’s a structure for containing a block of code.

  • Once contained it will only be executed when called.

  • The contained block of code can perform logic and previously defined variables or new variables that are passed in at the time of the call

  • It can returns an output that can be saved in a new variable at the call location.

What's the point?

  • Functions are arguably the most important concept in computer science, programming and mathematics. This is because because they allow us to generalize transformations can be used over and over.

  • Putting functions together is what bring computers to life, they let us stand on the shoulders of giants. Countless programmers have (generously) already defined the logic in lower level function we use every day to simplify mind the bogglingly complex logic our computers process constantly.

  • Bonus Thought: An open source programming language like Python is really a beautiful example of humanity coming together. Its great that everyone contributes so everyone can benefit.

What syntax is required to build a valid function?

  • Keyword "def" (short for "define a function")

  • Unique function name

  • Parentheses for optional arguments

  • Ending colon:

  • Indentation

  • Pass, logic or return

Why do we use the "def" abbreviation to define a function?

  • “Def” is short for definition, and represents the full phrase “define a function”

What does calling a function mean?

  • When we "call" a function we are asking the function to execute logic stored inside of it.

  • Optionally we can pass in an argument or have it return us a variable.

What is the syntax that is required to call a function?

  • Calling a function can be done by typing the name of the function without the “def” part and adding parentheses at the end”

How can we get changes back from our function?

  • The keywords “pass” and “return” let us get either nothing or something back from our function.

What is a parameter?

  • A parameter is a variable of potentially any type.

Is there a difference between parameters and arguments?

  • Yes, but a small difference
  • Parameters are the names of variables accepted for input in the definition of a function.
  • Arguments are the variables passed into an invoked function:

What are *args and **kwargs?

  • They are arguments of varying lengths.
  • *args allows you pass an arbitrary number of positional arguments into your function.
  • Similarly, **kwargs allows you to pass an arbitrary number of dictionary key-value pairs.
Preview 13:09

This “how” lesson demonstrates:

  • How we can use one of the most powerful tools in programming the function to reuse and store code.

  • How we can call on this stored code when we need it.

  • How we can pass extra information into the storage area of a function to get even more versatility with our logic.

Preview 24:39

Why: Nesting, Closure, Decorators & First Class Functions? (W/ Mnemonics)

How-To: Python Decorators, Closure, Nesting & First Class Functions

In this episode we heard the stories of….

We heard the story of first show of the now world famous music band the “Gas Pump Rockers” a band made up 5 high school aged gas pumps who can get people so excited about dancing in clogs it will blow your mind.

Then we followed their guitarists and the story of when he  tried to call his mom he discovered the blue phone booth was actually the TARDIS from Dr. Who and he had the perfect skill setup to repair its warp drive.

After that we met some greedy band managers who got their just deserves thanks to the technology revolution that allows creatives of all types to manage their own careers.

And finally we ended last week's epic journey with a wonderful story about the americans and russians coming together for the sake of safe space travel.

So now, great ready to continue our amazing adventures as we explore more of our Python Memory Palace!

Memory Palace: Python Functions (Section 9 Wrap Up)
10 Chapter Review
2 Lectures 23:39
Chap 2 Review: Python Nouns, Connections & Mnemonics

Chap 2 Review: Section Verbs
3 More Sections
About the Instructor
Dylan Jorgensen
4.5 Average rating
117 Reviews
4,765 Students
1 Course
Python Programmer, Comedian

I have been programming for over 10 years as a startup CTO, a freelancer and in a traditional 9-5 job setting. Most of my projects have been in the field of data science, but I've also worked on projects in areas of urban modeling, statistics and machine learning. 

My current passion lies in machine intelligence (A.I. as the movies call it). In 2017, I am diving head first into the world of online education to build a number of programming courses. They will span from introductory Python all the way up to neural networks in TensorFlow. 

I love the science of learning and pushing myself to learn faster using mnemonics and other discoveries in neuroscience. So to differentiate my teaching styles from others, I am planning all my educational series with a focus on these learning methods. 

I'm really excited to share my programming courses with you in 2017. I've always wanted to be a Neil deGrasse Tyson type at heart. :) So if you like Ex Machina, HBO’s Westworld or Wall-E, join me and let's destroy or save the world together!