Skip to content

Opensource-Academy/python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Python

Description

Python is a widely used high-level programming language for general-purpose programming, created by Guido van Rossum and first released in 1991. -Wikipedia

Python is a programming language that can both be utilised to do nearly anything and still remains the perfect programming language for those who are new to programming.

Installation

Warning! Python has a version 2 and a version 3. Python version 2 is almost end of life, as such, development should be done in Python 3.

Warning! On older MacOS versions and most Debian based Linux distributions both Python 2 and Python 3 are already installed by default. Running the 'python' command from a terminal will usualy start Python 2, running 'python3' starts Python 3.

Note: You can see what version of Python your 'python' command is bound to by entering the following into a terminal:

python -V

Warning! Do not change the Python installs that came with your system. On Linux, you can use pyenv to easily install and manage different versions of Python.

On MacOS: MacOS comes with Python already installed. You can download the latest version of Python from https://www.python.org/ On Debian based Linux: Most distros come with Python already installed. Otherwise install it with apt:

sudo apt install python

or

sudo apt install python3

Configuration

Unless you have used the Python installer from python.org you probably still need to install pip and virtualenv.

Usage

You can start Python from the command line.

Start the Python interactive shell.

python

Run a python script.

python ./<scriptname>.py

Python introduction

If you have never programmed before, you can use this guide to get started with the help of Python.

If you just want to get started with Python you could use any of these sources: https://automatetheboringstuff.com/chapter0/

Standards

https://www.python.org/dev/peps/pep-0008/

Naming conventions

According with pep8, use under_score.

Additional resources

If you have finished the introduction to programming course in Python, or feel ready to move on, here are some valuable resources to get some more in-depth Python knowledge:

   Copyright 2018 Opensource Academy

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Releases

No releases published

Packages

No packages published