Skip to content

muhammeta7/Python-Tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 

Repository files navigation

Description

This repo is to document & create a tutorial to learn Python. Below is a list of useful links and definitions that may be of use. My focus is on the basics and branching out to work with data collection and analysis.

Table of Contents

Personal Coding Advice & Experience

Why Coding?

  • Learn something new daily with a vast surplus of information & constant advancements in technology.
  • Career is in high demand AKA high salary. Rewards are priceless even without the high salary.
  • Flexibility to work remotely and save time on commutes.
  • Freedom to pursue personal projects and improve quality of life.
  • Community is enthusiastic to share wealth of knowledge with fellow developers.

Keys to Success

  • Get ready to be a master at Google. No need to memorize everything.
  • Accept and embrace failure quickly. Avoid trying to be a perfectionist.
  • Troubleshooting and debugging mistakes thoroughly to find a solution is important for learning.
  • Type the code out until you feel comfortable enough to copy and paste. Practice makes perfect.
  • You are essentially learning how to learn on the first go around.
  • Be very specific in your questions and always research before asking.
  • Write easy to read code and use proper indentation.

Clean Code With Uncle Bob
TOC


What is Python?

  • Interpreted language that runs on Windows , Mac OS X, Linux, etc.
  • Supports object-oriented, procedural, and functional programming.
  • Supports basic data types such as strings and numbers and complex data types like lists and dictionaries.
  • Strongly typed but is also dynamically typed, meaning you are freed from worrying about variable declarations.
  • Open source, friendly, and simplistic but with a lot of power.

Python Landing Page
What is Python?
TOC


Why Learn Python?

EASY TO USE
  • Focus on programming concepts versus learning syntax.
  • User-friendly documentation and installation.
  • Developers contribute religiously to community by creating Python libraries.

Python Ebook
Python Docs
Standard Library Docs

POWERFUL
  • Google, Dropbox, Spotify all use Python.
  • Allows for cross-platform compatibility.
  • Suited for rapid delivery and maintenance.
  • Python developers tend to have higher salaries than other languages.

Apps

VERSATILE
  • Client and server side capabilities.
  • Used for machine learning, game engines, artificial intelligence and data science.
  • Thousands of third-party modules

Python Package Index(PyPI)

TOC


Getting Started

Personal preference but executable file download is the simplest option. Download and install Python based off your operating system and system type.

WINDOWS DOWNLOAD

MAC OS X DOWNLOAD

IDE SELECTION

Choose and download the IDE of your choosing. I pay for JetBrains ItelliJ because I love it.
IDE Download Options

TOC


The Fundamentals

VARIABLES

A variable is a name that refers to a value. An assignment is the statement that assigns a value to a variable. A reserved location in memory to store a value(data) like a string or a number. In a program it gives data to the computer for processing.

  # Examples
  a = 10
  greeting = 'Howdy'
  pi = 3.1415926535897932
  current_player = None
Types

A category of values.

Type Value Description
bool True or False Boolean
float 5.3 Floating-point number
int 1 Integer
str 'single' or "double" String
None Absence of value
More Information
Rules for Variable Names
  • Must begin with a letter(upper or lower case) or an underscore_ character
  • Can contain letters, numbers or underscore characters but can not begin with a number
  • Case sensitive so example and Example refer to 2 different variables but by convention only lowercase letters are used.
  • Underscore character is often used in names with multiple words.
  • Variables are names/labels that are bound to a value with the use of =.
  • Keywords can not be used as variable names. Reserved Keywords
More Info

Opertors

Arithmetic

Operation Symbol
Addition +
Subtraction -
Multiplication *
Division /
Floor Division //
Modulo(Remainder) %
Exponentiation **
Operator Precedence
PEMDAS

Parenthesis, Exponents, Multiplication / Division, Addition / Subtraction

  • Multiplication and division have equal precedence.
  • Addition and subtraction have equal precedence.
  • If an expression contains operations of equal precedence, they're evaluated from left to right.

DATA TYPES

Strongly typed but is also dynamically typed, meaning you are freed from worrying about variable declarations. Python's built-in data types include:

  • numeric

    Note: It is important to understand the difference in the different numeric types.

    int
    • Whole numbers with no fractional part or decimals.
    • Computations using integers are significantly faster than using floating point numbers.
    • Python 3 has no maximum size limitation for ints. You will run out of memory before you can can exceed the size limit.
    • Python 2 used to have a long for large numbers but has been replaced by int in latest edition.
    float
    • Real numbers or numbers having a fractional part after the decimal.
    • Max float value on 64 bit computer is 1.797e308 or move the decimal 308 places right.
    • Minimum float value is 2.25e-308 or 307 zeros before the decimal point.
    • 52 digits of precision generally enough, but if you require more precision you can use a Decimal data type.
    complex
    • Contain a real and an imaginary part, based on square root of -1.
    • More for advanced mathematics/engineering topics.
    • WILL NOT be covered in this tutorial.

TOC


Authors

Muhammet Aydin Muhammet Aydin

About

Tutorial documentation in order to learn Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages