All Projects → shannonturner → Python Lessons

shannonturner / Python Lessons

Licence: mit
Exercises and code snippets to share with my students

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Python Lessons

curso-em-video-python3
Desafios resolvidos de Python do Canal Curso em Vídeo.
Stars: ✭ 23 (-94.97%)
Mutual labels:  exercises
crash-course
This course is intended to quickly get you up to speed on Roku SceneGraph. It's aimed at an audience of developers who are familiar with streaming video applications but are unfamiliar with Roku.
Stars: ✭ 118 (-74.18%)
Mutual labels:  lesson
Intro Node Js
[Course] Code for Introduction to Node.js
Stars: ✭ 320 (-29.98%)
Mutual labels:  exercises
rr-organization1
The Organization lesson for the Reproducible Science Curriculum
Stars: ✭ 36 (-92.12%)
Mutual labels:  lesson
Zeek-Network-Security-Monitor
A Zeek Network Security Monitor tutorial that will cover the basics of creating a Zeek instance on your network in addition to all of the necessary hardware and setup and finally provide some examples of how you can use the power of Zeek to have absolute control over your network.
Stars: ✭ 38 (-91.68%)
Mutual labels:  lesson
Jdk9 Jigsaw
Examples and exercises based on some of the features of jigsaw in JDK9/Jigsaw (Early Access builds)
Stars: ✭ 275 (-39.82%)
Mutual labels:  exercises
Ejercicios-Practicos
Mejora tu lógica de programación y aprende mucho más resolviendo estos ejercicios.
Stars: ✭ 316 (-30.85%)
Mutual labels:  exercises
Javascript Exercises
📚 Collection of JavaScript exercises and coding challenges.
Stars: ✭ 385 (-15.75%)
Mutual labels:  exercises
machine-learning-novice-sklearn
A Carpentry style lesson on machine learning with Python and scikit-learn.
Stars: ✭ 22 (-95.19%)
Mutual labels:  lesson
Little Javascript Book
Early draft for The Little JavaScript Book
Stars: ✭ 305 (-33.26%)
Mutual labels:  exercises
cloud-genomics
Introduction to Cloud Computing for Genomics
Stars: ✭ 13 (-97.16%)
Mutual labels:  lesson
python-exercises
Exercises for Python
Stars: ✭ 17 (-96.28%)
Mutual labels:  exercises
Elixirschool
The content behind Elixir School
Stars: ✭ 3,171 (+593.87%)
Mutual labels:  lesson
cloud-bulletinboard-ads
This is the bulletinboard-ads sample application code used in the openSAP course: Cloud-Native Development with SAP Business Technology Platform (formerly SAP Cloud Platform).
Stars: ✭ 75 (-83.59%)
Mutual labels:  exercises
Exercises answers
计算机网络:自顶向下方法 (原书第七版)陈鸣译 课后习题参考答案(中文版+英文版);计算机系统基础(第2版)袁春风 课后习题参考答案;操作系统教程(第5版)费翔林 课后习题参考答案;数据结构(用C++描述)殷人昆)课后习题参考答案;算法设计与分析 黄宇 课后习题参考答案;
Stars: ✭ 332 (-27.35%)
Mutual labels:  exercises
oop-exercises
Exercises for those who want to learn Object Oriented Programming in C++ 🔥
Stars: ✭ 27 (-94.09%)
Mutual labels:  exercises
Simply-Scheme-Exercises
All of the exercises (and their solutions!) from the Berkeley textbook Simply Scheme.
Stars: ✭ 97 (-78.77%)
Mutual labels:  exercises
Learninggo
Learning Go Book in mmark
Stars: ✭ 438 (-4.16%)
Mutual labels:  exercises
Php Interview Exercises
Some exercises to practice whiteboard interview questions in PHP.
Stars: ✭ 351 (-23.19%)
Mutual labels:  exercises
Pytorch exercises
Stars: ✭ 304 (-33.48%)
Mutual labels:  exercises

First time installing/running Python? Be sure to check out the Start Here guide: https://github.com/shannonturner/python-lessons/blob/master/start-here.md

In here are code snippets, examples, and other ways to help teach some of the concepts and tricks in Python.

Slides are available to download here: https://github.com/hearmecode/slides

Suggested Learning Progression

If you're new to Python you may wonder what you should learn and when you should learn it. I recommend this order seen below. Each section below has its own folder above; each bullet point has its own file within that folder.

So if you wanted to learn more about variable assignment, go to the folder section_01_(basics) and open up variable_assignment.py

Section 1: General Programming Basics

  • Simple Math
  • Variable Assignment
  • Basic Syntax and Logic
  • Data Types: int, float, bool, str

Section 2: Strings

  • Identifying and using strings
  • String slicing
  • String formatting
  • String methods
    • str.replace()
    • str.find()
    • str.count()
    • str.lower()

Section 3: Conditionals

  • Logical control; changing the behavior of your programs
  • and keyword, or keyword
  • if / else structure
  • if / elif ... / else structure
  • Nesting conditionals

Section 4: Lists

  • Containers for data types
  • First In, Last Out (Stack)
  • Accessing specific list items through index (slice notation)
  • List methods
    • list.append()
    • list.insert()
    • list.pop()
    • list.extend()
  • Finding items in list (in keyword)
  • Deduplicating a list using list(set(list_to_deduplicate))

Section 5: Loops

  • for loop (for each item in a list: ...)
  • enumerate()
  • zip()
  • range()
  • while loop (ask each time: is this still true?)

Section 6: Strings to Lists and Vice-Versa

  • str.join() (create a string from a list)
  • str.split() (create a list from a string)

Section 7: File handling

  • with open(filename) as textfile: ...
  • file.read()
  • Reading text files
  • Reading CSV files
  • File handling flags (r, w, b, +)
  • Writing to files

Section 8: Python's Most Commonly Used Built-in Functions

    • Types (used primarily for converting one type to another)
  • int()
  • float()
  • str()
  • bool()
  • list()
  • set()
  • dict()
    • Comparison and Calculation
  • abs()
  • len()
  • max()
  • min()
  • round()
  • sum()
    • Loop (Sequence) Control
  • enumerate()
  • range() / xrange()
  • reversed()
  • sorted()
  • zip()

Section 9: Functions

  • def keyword
  • arguments
  • default arguments
  • *args
  • **kwargs
  • return keyword
  • sequence unpacking (return and receive multiple values)
  • namespaces

Section 10: Dictionaries

  • Accessing specific dictionary items through key (looks like a slice)
  • Accessing all keys as a list using .keys()
  • Faking a sorted dictionary by using sorted() on the .keys()
  • Accessing all values as a list using .values()
  • Accessing all key, value pairs as a list using .items()
  • Adding new items through .fromkeys()
  • Checking for whether a key exists with .has_key
  • Using .get() to safely get a key's value if it exists without getting an error if not
  • Adding new items with direct assignment and .update()

Section 11: Dictionaries and Lists, together

  • Accessing specific items in a nested list
  • Accessing specific items in a nested dictionary
  • Accessing specific items in a nested list within a dictionary
  • Accessing specific items in a nested dictionary within a list
  • If you can do those four above, you can handle receiving JSON API returns

Section 12: Standard Library

  • import keyword
  • from ... import ... as ... structure
  • time
  • random
  • math
  • re (regular expressions)
  • os
  • sys
  • json

Section 13: External Libraries (Not necessarily in order; keep these in mind)

  • Installing external libraries with easy_install
  • Using easy_install to install pip (an easier / better way to install external libraries)
  • requests (web crawling made easy)
  • BeautifulSoup (parsing HTML)
  • xlrd (Read Excel .xls files)
  • xlwt (Write to Excel .xls files)
  • xlsxwriter (Write to Excel .xls and .xlsx files, with additional functionality beyond xlwt)
  • cherrypy (Simple, lightweight framework for serving web pages)
  • psycopg2 (Connect to and issue SQL commands to your postgresql database)

Section 14: Exception Handling

  • try / except syntax
  • Using multiple excepts
  • Recognizing the different error types
  • Exception, the generic exception type (use sparingly)
  • Nesting exception handling
  • try / except / else syntax

Section 15: Intermediate Concepts

  • List Comprehensions
  • Inline Conditionals
  • Generators

Section 16: Classes

  • Classes
  • Magic Methods
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].