Introduction

About me

Name: Iva E. Popova

First PC: Правец 8А
First OS: DOS
First Programming Language: BASIC
First technical schools: УКТЦ по МТТ, гр. Правец
First Cat: black and yellow eyed

What I've used Python for?

Back-End Web Development.
Data scraping, analyses and transformation.
Natural Language Processing, opinion mining.

Tech skills

HTML, CSS, JavaScript, React.js, Vue.js,...
Python, Perl6, Perl5, C++, Prolog.
GraphDB, MongoDB, MySQL/Postgre.
RDF, WordNet.
Knowledge representation, ontologies.

Teaching Experience

Technical University:
Programming languages
Internet Programming
Discrete Mathematics
Artificial Intelligence and Expert Systems
IT-Academy:
HTML, CSS
ProgressBG:
Front-End Development
MySQL
Python

Course Email

progressbg.python.course@gmail.com

use it to submit your HW
ask any questions

Python intro

Python intro

picture source: @imgur.com
from If programming languages were essays...

History

Creator: Guido van Rossum
Named after Monty Python's Flying Circus comedy show.
Python 1.0 - January 1994
Python 2.0 - October 2000
Python 3.0 - December 2008

What's the use of Python?

Python is a general-purpose programming language, used for:
System administration (incl. cloud)
Embedded devices (incl. Raspberry Pi, Arduino, ...)
Web and Internet Development
Mobile apps development
Data Science, Big Data, Machine Learning
Scientific computing
Education

Python implementations/distributions

Python is an open source project: Python's github

CPython - the official Python distribution.
PyPy - faster and compliant with Python2 and Python 3
Jython - Python for the Java Platform.
IronPython - the Python programming language for the .NET Framework.
Pyjs - contains a Python-to-JavaScript compiler, an AJAX framework and more.

Setting up Python

Setting up Python (on Windows, Mac, Linux)

Install Python on Windows - HowTo

Download the Installer:
Python Releases for Windows
Select 32-bit and 64-bit versions according to your system
Customize installation:
installation location:
C:/Python27 or
C:/Python36
Select "Add Python to PATH"

If you don't have a convenient terminal install gitbash for windows, which is included in the git for windows package.

Install Python on Windows - more info

How to Install Python on Windows @howtogeek.com
Using Python on Windows @docs.python.org

Install Python on Mac - more info

Using Python on a Macintosh @docs.python.org

Install Python on Linux

Using Python on Linux @docs.python.org

Verify installation:

Open a command prompt and type:

					# check for python installed version:
					python --versions

					# check for pip installed version:
					pip --version
				

Let's get dirty - write your first Python script (using IDLE).

Open your Python's IDLE
It's bundled with Python installation, so it's already in your machine.
Write down next code (put your names in the quotes) and hit enter:

			first_name = "Iva"
			last_name = "Popova"
			print(first_name + last_name)
		

Python IDEs and text editors

JetBrains' PyCharm
Quick Start Guide
Sublime Text 3
More on using Sublime Text with Python: Setting Up Sublime Text 3 for Full Stack Python Development
Visual Studio Code
More on using VS Code with Python: Python in Visual Studio Code

Write Python in VS Code

Write Python in VS Code

Useful Keyboard Shortcuts

KeysAction
ctrl+shift+pOpens Command Palette
ctrl+sSave file
ctrl+`Toggle Terminal/Output panel
ctrl+zUndo what you've typed
ctrl+lWhile in terminal will clear the output

Command Palette gives you access to all VS commands in the given context.

Prepare your Workspace

Make a root folder for your python projects.
Open vscode.
Select "Add folder" and choose the folder you've made.
In the sidebar, the "Explorer" will show your folder.
Save your workspace (you can use the same name as the project)
Menu=>File=>save Workspace As...
CTRL+SHIFT+P=>save Workspace As...

Prepare your Workspace - demo

Your Workspace should look like:

Workspace settings

Press CTRL+SHIFT+P and type Workspace Settings
Here you can change the default settings, as you wish in order to customize your experience with your project.

Create and execute a Python file

Right click on the root folder in VS Code Sidebar.
Select: "New File", enter the name: say_hello.py and press enter.
Write down this code (put your name in the quotes):

				my_name = "Iva"
				print("Hello " + my_name)
			
Right click anywhere on the editor window and select "Run Python File in Terminal".
Note, this command will be present, only if you've been installed the extension: python by microsoft

Create and execute a Python file - demo

A terminal panel should be opened in your editor showing the python script execution and its output:

Select Python version

ctrl+shift+p and find Python: Select interpreter

Useful videos

How to Install Python with Visual Studio Code [2018] by Jason E.

Useful videos

VS Code - Setup and Basics by Visual Studio Code

Useful Readings

Python in Visual Studio Code @code.visualstudio.com
How to use bash on Windows from visual studio code integrated terminal? @stackoverflow

These slides are based on

customised version of

Hakimel's reveal.js

framework