Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Basic description of the Python programming language, Difficulty: Easy, Category: Background
:keywords: python, install, basics, scripts, interpreter, foundations
```

<!-- #region -->
# Introducing the Python Programming Language

Expand All @@ -22,7 +28,7 @@ In this section we will learn
- How one writes and executes Python code.

## What is Python?
**Python is a programming language**. That is, it provides us with a strict set of grammatical rules that correspond to well-defined instructions that a computer will obey. The tremendous value of this is that we can write text documents that are relatively simple and inuitive for humans to read, and yet can inform the computer to perform precise operations. Python **code** is simply text that conforms to the Python language.
**Python is a programming language**. That is, it provides us with a strict set of grammatical rules that correspond to well-defined instructions that a computer will obey. The tremendous value of this is that we can write text documents that are relatively simple and intuitive for humans to read, and yet can inform the computer to perform precise operations. Python **code** is simply text that conforms to the Python language.

For example, the following text obeys the rules of the Python language:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Integrated Development Environments, Difficulty: Easy, Category: Tools
:keywords: python, introduction, IDE, PyCharm, VSCode, Jupyter, recommendation, tools
```

# Setting Up a Development Environment
## What You Will Learn

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Informal Introduction to Python, Difficulty: Easy, Category: Tutorial
:keywords: python, installation, script, introduction, ipython, console, quick introduction
```

# An Informal Introduction to Python
Now that you have the Anaconda distribution of Python installed on your machine, let's write some simple Python code! We are going to forego writing a full Python script for now, and instead make use of a convenient tool for doing quick code scratchwork. The IPython console was installed as a part of Anaconda; it will allow us to build incrementally off of snippets of code, instead of having to execute an entire script all at once.

Expand Down
6 changes: 6 additions & 0 deletions Python/Module1_GettingStartedWithPython/Installing_Python.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Installing Python with Anaconda, Difficulty: Easy, Category: Tutorial
:keywords: python, anaconda, instructions, environments, beginner, data science, introduction
```

## Installing Python

Without further adieu, we now provide instructions for installing Python and other useful Python libraries on your machine via the Anaconda platform. Installing the Anaconda platform will install the following:
Expand Down
6 changes: 6 additions & 0 deletions Python/Module1_GettingStartedWithPython/Jupyter_Notebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Jupyter notebooks, Difficulty: Easy, Category: Tutorial
:keywords: jupyter, notebook, kernel, basics, server, console, command line, plot, beginner, data science
```

# Jupyter Notebooks
In recent years, the Jupyter Notebook has become a massively popular tool for doing research-oriented work in Python and other languages alike. Its emergence marked a paradigm shift in the way data science is conducted.

Expand Down
6 changes: 6 additions & 0 deletions Python/Module1_GettingStartedWithPython/SiteFormatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Overview of formatting in Python Like You Mean It, Difficulty: Easy, Category: Instructions
:keywords: overview, formatting, background, code block, console style
```

<!-- #region -->
# A Quick Guide to Formatting
This section provides a brief overview of the code formatting style that will be used throughout this text. You are not expected to understand the details of the code, here. This merely provides a guide for what is to come.
Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Basic_Objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Basics of Python Objects, Difficulty: Easy, Category: Section
:keywords: integers, booleans, floats, floating point precision, lists, strings, fundamentals
```

<!-- #region -->
# Basic Object Types

Expand Down
7 changes: 7 additions & 0 deletions Python/Module2_EssentialsOfPython/ConditionalStatements.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Conditional Statements, Difficulty: Easy, Category: Section
:keywords: if, else, elif, inline if, switch statement, comparison operator, bool, truth, is operator
```


# Conditional Statements

<div class="alert alert-warning">
Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/DataStructures.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Data Structures, Difficulty: Medium, Category: Section
:keywords: Big-O, complexity, efficiency, algorithm, interview preparation, list, tuple, sequence
```

<!-- #region -->
# Data Structures (Part I): Introduction
Here we survey Python's built-in data structures. You should already be familiar with its lists and tuples, two data structures that facilitate working with sequential data. Two other critical, built-in data structures to be introduced are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Introduction to Sets, Difficulty: Medium, Category: Section
:keywords: set, complexity, comparison, union, intersection, membership, hashing, lookup, interview preparation
```


# Data Structures (Part III): Sets & the Collections Module
## The "Set" Data Structure
The `set` type describes an *unordered* collection of *unique* objects. It is useful for:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Introduction to Dictionaries, Difficulty: Medium, Category: Section
:keywords: dictionary, complexity, key, value, iteration, get item, hashing, lookup, interview preparation
```

# Data Structures (Part II): Dictionaries
Python's dictionary allows you to store key-value pairs, and then pass the dictionary a key to quickly retrieve its corresponding value. Specifically, you construct the dictionary by specifying one-way mappings from key-objects to value-objects. **Each key must map to exactly one value**, meaning that a key must be unique.

Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/ForLoops.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Contorl flow with for-loops and while-loops, Difficulty: Easy, Category: Section
:keywords: for-loop, while-loop, break, control flow, basic programming
```

# For-Loops and While-Loops
In this section, we will introduce the essential "for-loop" control flow paradigm along with the formal definition of an "iterable". The utility of these items cannot be understated. Moving forward, you will likely find use for these concepts in nearly every piece of Python code that you write!

Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Functions and Function Signatures, Difficulty: Medium, Category: Section
:keywords: functions, *args, **kwargs, signature, default parameter, docstring, return, vowel count, syntax, basics
```

<!-- #region -->
# Basics of Functions
<div class="alert alert-warning">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: generators comprehensions and efficiency, Difficulty: Easy, Category: Section
:keywords: generator, range, list comprehension, generator comprehension, nested comprehensions, inline for-loop, filtered, iterator
```

# Generators & Comprehension Expressions
<div class="alert alert-warning">

Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: introduction to control flow, Difficulty: Easy, Category: Section
:keywords: overview, summary, if, else, function, for-loop, if, else, control flow
```

<!-- #region -->
# Introducing Control Flow
Very simply put, to "control flow" in your code is to affect the order in which the
Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Iterables.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: the basics of iterables in python, Difficulty: Medium, Category: Section
:keywords: iterables, max, min, sum, all, any, itertools, enumerate, unpack
```

# Iterables
Our encounter with for-loops introduced the term *iterable* - an object that can be "iterated over", such as in a for-loop.

Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Itertools.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: simple use cases of python itertools, Difficulty: Easy, Category: Tutorial
:keywords: itertools, examples, zip, range, enumerate, chain, combinations
```

<!-- #region -->
# Python's "Itertools"
Python has an [itertools module](https://docs.python.org/3/library/itertools.html), which provides a core set of fast, memory-efficient tools for creating iterators. We will briefly showcase a few itertools here. The majority of these functions create [generators](https://www.pythonlikeyoumeanit.com/Module2_EssentialsOfPython/Generators_and_Comprehensions.html), thus we will have to iterate over them in order to explicitly demonstrate their use. It is hard to overstate the utility of this module - it is strongly recommended that you take some time to see what it has in store.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: For-Loop Exercise, Difficulty: Easy, Category: Practice Problem
:keywords: for loops, list, function, list comprehension, practice problem
```


<!-- #region -->
# Difference Fanout

Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Problems/EncodeAsString.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: String Encoding Exercise, Difficulty: Medium, Category: Practice Problem
:keywords: function, string, casting, practice problem
```

# Encode as String
Sometimes it is very important to handle different input object types differently in a function. This problem will exercise your understanding of types, control-flow, dictionaries, and more.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Within Margin Exercise, Difficulty: Medium, Category: Practice Problem
:keywords: function, control flow, comparisons, practice problem
```

<!-- #region -->
# Within Margin Percentage

Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Problems/MergeMaxDicts.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Dictionary Merge Exercise, Difficulty: Easy, Category: Practice Problem
:keywords: dictionary, merge, practice problem
```

<!-- #region -->
# Merging Two Dictionaries
> Merge two [dictionaries](https://www.pythonlikeyoumeanit.com/Module2_EssentialsOfPython/DataStructures_II_Dictionaries.html#Data-Structures-(Part-II):-Dictionaries) together such that the resulting dictionary always retain the *greater* value among mappings with common keys.
Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Problems/Palindrome.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Palindrome Exercise, Difficulty: Easy, Category: Practice Problem
:keywords: string, palindrome, practice problem
```

<!-- #region -->
# Is Palindrome
> A palindrome is a string that reads the same from left to right and from right to left. Strings like `racecar` and `Live on time, emit no evil` are palindromes. Notice that only valid alphanumeric characters are accounted for and that palindromes are not case-sensitive. Given a string, return whether or not it is a palindrome.
Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: variable score and namespaces in python, Difficulty: Medium, Category: Section
:keywords: variable, namespace, function, scope, shadowing
```

# Scope

<!-- #region -->
Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/SequenceTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: understanding python sequences, Difficulty: Easy, Category: Section
:keywords: list, tuple, string, slice, index, negative index, get item, pop, append, examples
```

<!-- #region -->
# Sequence Types

Expand Down
6 changes: 6 additions & 0 deletions Python/Module2_EssentialsOfPython/Variables_and_Assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: variable naming and assignment, Difficulty: Medium, Category: Section
:keywords: variable naming, valid names, mutable, immutable, reference, pointer
```

# Variables & Assignment

<div class="alert alert-warning">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Indexing into multi-dimensional numpy arrays, Difficulty: Easy, Category: Section
:keywords: numpy array, multidimensional, index, slice, negative index, rows, columns
```

<!-- #region -->
# Accessing Data Along Multiple Dimensions in an Array
In this section, we will:
Expand Down
6 changes: 6 additions & 0 deletions Python/Module3_IntroducingNumpy/AdvancedIndexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Advanced indexing with numpy arrays, Difficulty: Hard, Category: Section
:keywords: numpy array, integer array indexing, boolean array indexing, copy indexing, advanced
```

<!-- #region -->
# Advanced Indexing

Expand Down
6 changes: 6 additions & 0 deletions Python/Module3_IntroducingNumpy/ArrayTraversal.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Numpy array traversal ordering, Difficulty: Medium, Category: Section
:keywords: row-major order, c order, column-major order, f order, traversal, array iteration
```

# Iterating Over Arrays & Array-Traversal Order
In this section, you will learn:

Expand Down
6 changes: 6 additions & 0 deletions Python/Module3_IntroducingNumpy/BasicArrayAttributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jupyter:
name: python3
---

```raw_mimetype="text/restructuredtext"
.. meta::
:description: Topic: Numpy array attributes, Difficulty: Easy, Category: Section
:keywords: ndim, shape, size, itemsize, dtype, examples
```

<!-- #region -->
# Basic Array Attributes
Armed with our understanding of multidimensional NumPy arrays, we now look at methods for programmatically inspecting an array's attributes (e.g. its dimensionality). It is especially important to understand what an array's "shape" is.
Expand Down
Loading