Sage-Code Laboratory

Python Tutorial

Python is a high-level dynamic computer language. At this time it is the second most popular computer language. Python was written by Guido van Rossum as a system scripting language. Some universities are using Python to teach programming concepts for Computer Science course.

Video Lecture

Next video lecture is 15 minutes long presented by Sage-Code founder. This film was made in Chicago in 2016. If you do not have the bandwith for videos, or if you already know about Python you can skip it. If you watch, you can post a comment and click the like button. This will help others intrested in programming to find us.

Python Language

Course Scope

This tutorial is for very beginners. It is a fast pace essential tutorial based on simplified English. We have presented the language features in logical order with short examples and notes. You should scroll down and read without pause or intreruptions until you finish each page. At the end of every page you should take a breack. One page/day will enable you to finish the course in about 8 days. We recommand to learn 4 days/week so in two weeks you will become a Python developer.

Curriculum

This tutorial is organized like a book. At the end of each page there is a link for the next page. Every page has a index link on top right corner, that will bring you back here. If you wish to go back to a previous chapter, use the browser back button or the index below. If you are first time here, skip the index and read on. You will use the index later.

Index:

  1. syntax
  2. variables
  3. control flow
  4. functions
  5. classes
  6. generators
  7. closures
  8. packages

Python Issues:

Python is a great language if you use it for the right application. It is a productive language, but you should be aware of several limitations before chosing Python for your next project.

Why is Python slow?

Python has several principles that are called "Zen of Python". Python is slow because of these principles. It was designed to be "user friendly" that is why is a "dynamic typed language" and not a "static typed language."

And what it means. During runtime you can change value and value type for a variable by using an assign statement. Another problem Python has is the GIL (global interpreter lock) this is hard to explain but it makes multicore/parallel applications work slow.

But… it also depend on algorithms you are using. How much data you store in memory and how this data is organized. Python do not have Arrays like C, C++ and Java. Array require fix data length. In Python a collection can hold any kind of data: Numeric, String even other collection. So you can have a list of lists or a dictionary of lists. This is why Python is slow.

Tools & Resources

A project require practice. Professional developers work locally on desktop computers and laptops. You can setup Pithon interpreter on your computer. Also there is a nice IDE available called IDLE. To make advanced projects in Python I recommand PyCharm IDE editor that has a community edition.

Running Examples

You do not need to install Python to follow this tutorial.For quick learning you can use repl.it website.I have posted some of our examples on my account for you to review and test. You will find links to so called "homeworks" that enable you to open these examples on-line. You can log-in with your GitHub account but this is not necesary for opening the examples, just if you wish to create your own.

Responsive Immage

On-line Example

Python I - Prep Quiz

Next quiz has 60 question. It is special designed to teach things. It does not have a time limit, but it requires you to sign-in using your Google account. We record your name with the test results on Google drive. If you don't agree, you can use name: Anonymous but then we can't endorse your new skills.
Python Quiz

Before taking this quiz, please learn some Python. Shall we?

Start Here: Syntax Overview