Data Analytics

Logo R Notes
Python Notes
Julia Notes
R-Studio Notes
Jupyter Notebooks
External Notes
Creating Markdown
Contributions

Introduction to Python

Python - Introduction


What is Python?

===============

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.Python is a popular programming language. It was created in 1991 by Guido van Rossum.

The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, https://www.python.org/, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation.

This tutorial introduces the reader to the basic concepts and features of the Python language and installation of python in different operating systems.Python is used in following ways:

a)web development (server-side),
b)software development,
c)mathematics,
d)system scripting and more...

What can Python do?

===================

Python can be useful in following ways:
a)Python can be used on a server to create web applications.
b)Python can be used alongside software to create workflows.
c)Python can connect to database systems. It can also read and modify files.
d)Python can be used to handle big data and perform complex mathematics.
e)Python can be used for rapid prototyping, or for production-ready software development.

Why Python?

===========

Python is one of the popular programmig language becuse of the following reasons:

a)Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
b)Python has a simple syntax similar to the English language.
c)Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
d)Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
e)Python can be treated in a procedural way, an object-orientated way or a functional way.

Python- Installation


Your programming environment is the computer you do your work on, and all the software that’s installed on your system which helps you write and run programs. Some systems are better for programming than others, but the best system to learn on is probably the one you are using right now. This section will help you get your system set up so you can start writing programs quickly.
Our goal is to help you get Python up and running on your computer, so that you can write and run your own programs. To do this, we want to:

  1. Find out if Python is already installed on your computer.
  2. Install Python, if it is not already installed.
  3. Install a text editor that will make it easy to run your first programs.
  4. Help you enter and run Hello World, your first Python program.
Mac

If you go to a Python conference or meetup, you’re likely to see more Macbooks than any other computer. So Macs are certainly a good platform on which to learn Python. Many of the people you see using Macbooks are actually running some distribution of Linux on their Mac, and running Python within a virtual Linux machine. You don’t have to worry about that yet, just know that if you continue to grow as a programmer your Mac will probably continue to serve you quite well.

Python 2.7 is probably already installed on your Mac, so we’ll just verify that it is installed, and then install Sublime Text. If you want to start with Python 3, we’ll walk you through setting up Python 3 on your system as well.

Python is probably already installed on your system. To find out if it is installed, open a terminal and type the word python. To open a terminal, go to Applications and look for Terminal, or enter ‘terminal’ in your system’s search bar.

sys$version
[1] "2.7.10 (default, Oct  6 2017, 22:29:07) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]"
    print("Hello Python world!")
Hello Python world!

From this output, we can see that Python is installed, and the currently installed version is Python 2.7.10. You’re now running a Python terminal session. You can start typing Python commands here, and you’ll see your output immediately:

For tutorial please follow the link https://www.youtube.com/watch?v=YYXdXT2l-Gg

Windows

Python doesn’t come pre-installed on most Windows computers, but you can download an installer that will set Python up for you. Once you have Python installed and running, it’s pretty straightforward to install other text editor, and then configure it to run Python programs.Please follow the links for tutorial for installaton information https://www.youtube.com/watch?v=YYXdXT2l-Gg