Introduction to Python

Introduction, Functions, Variables

Devesh Kayal , Head Content Creater - Python, DIG-IT.WORLD

Python is a versatile and beginner-friendly programming language. It features a clear and readable syntax, making it easy to learn and understand. Functions are essential building blocks in Python that allow you to break down complex tasks into smaller, reusable modules. They improve code organization, readability, and maintainability, enhancing productivity and facilitating code reuse in various applications. In Python, variables are used to store and manipulate data. A variable is essentially a named location in memory that holds a value. Unlike some other programming languages, Python does not require explicit declaration of variables. You can assign a value to a variable using the assignment operator (=).

For example, x = 5 assigns the value 5 to the variable x.

What is Python?

 

Python is an interpreted, high-level, general-purpose programming language.  It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. Python is often described as a "batteries included" language due to its comprehensive standard library.

 

When Python was made

December 1989

 

Who made it

Guido Van Rossum

 

Where was it made

Netherlands
 

Uses of Python.

 

Python can be used to develop different applications like web applications, graphic user interface based applications, software development application, scientific and numeric applications, network programming, Games and 3D applications and other business applications.

 

1) Python can be used to develop prototypes, and quickly because it is so easy to work with and read.

 

2) Most automation, data mining, and big data platforms rely on Python. This is because it is the ideal language to work with for general purpose tasks.

 

3) Python allows for a more productive coding environment than massive languages like C# and Java. Experienced coders tend to stay more organized and productive when working with Python, as well.

 

4) Python is easy to read, even if you're not a skilled programmer. Anyone can begin working with the language, all it takes is a bit of patience and a lot of practice. Plus, this makes it an ideal candidate for use among multi-programmer and large development teams.

 

5) Python powers Django, a complete and open source web application framework. Frameworks - like Ruby on Rails - can be used to simplify the development process.

 

  • Real Life Applications


 

  1. Web and Internet Development.
  2. Desktop GUI Applications.
  3. Science and Numeric.
  4. Software Development.
  5. Education.
  6. Database Access.
  7. Network Programming.
  8. Games and 3D Graphics.


 

Companies


 

  • Industrial Light and Magic.
  • Google.
  • Facebook.
  • Instagram.
  • Spotify.
  • Quora.
  • Netflix.
  • Dropbox.

 

 

  • Products

 

Instagram

Google

Spotify

Netflix

Uber

Dropbox

Pinterest

Instacart

 

Python Data Types

Data Types

Classes

Description

Numeric

int, float

holds numeric values

String

str

holds sequence of characters

Sequence

list, tuple, range

holds collection of items

Mapping

dictionary

holds data in key-value pair form

Boolean

bool

holds either True or False

Set

set, frozenset

hold collection of unique items


 

We will primarily be focusing only on Strings and Integers. 

 

  • A function is a set of statements that take inputs, do some specific processes and produces output. The idea is to put some commonly or repeatedly done task together and make a function, so that instead of writing the same code again and again for different inputs, we can call the function.


 

  • Any of a set of routines that perform standard mathematical functions included in a programming language; either included in a program at compilation time, or called when a program is executed. Eg- Print () - Prints to the standard output device


 













 

Variables

Variables are used for storing data values. A variable is created the moment you first assign a value to it.












 

 



 

Python Comments

Comments can be used to explain Python code. Comments can be used to make the code more readable. Comments can be used to prevent execution when testing code.