DEV Community

dinesh chinnathurai
dinesh chinnathurai

Posted on

Learn Python - Day 1

Chapter 1

What python can do?

  • Python is versatile programming language and known for its simplicity and readability
  • Python can do many things like web development, Data analysis and visualization, AI and ML, scripting for automation, Desktop GUI application, database access and so on.

Why python?

Python language simplicity, versatility, community support, and industry adoption make it a preferred choice for a wide range of applications, and it is now effectively used in the field of Finance, Data visualization, ML and AI.

Key points

  • Python syntax is easy to understand, and it resembles human language.
  • It supports multiple programming concepts like procedural, object-oriented and functional programming.
  • It has large active community of developers to support, knowledge sharing, contribute to python open-source projects and so on.
  • Python can run in various platforms like windows, Linux, IOS.
  • Python is an open-source software (Free to use)

Python syntax compared to other programming language.

  • Python syntax is concise and emphasizes readability with minimal syntactic terms and indentation is used to define the structure of the code, making it clear and organized.
  • In other programming languages, the explicit syntax with curly braces to define blocks of code and it requires more syntactic terms are used to code for method definitions class structures

Python Installation

windows:

  • Download the latest package from the below link or browse the supported package based on your windows OS.
  • https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe
  • Double click exe file and proceed with installation in as per the instructions provided in the installation window and until successful installation

To verify installation

Open command prompt and type python, if it installed properly you will see the below information with version details.

C:\Users\Win11>python

Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.


Ubuntu:

  • Open the terminal window
  • Run the command "apt-get install python"
  • Follow the prompts to complete the installation
  • Alternatively, download the Python package for Ubuntu from the official Python website and install it manually.

*To verify installation *

  • open terminal
  • Type "python -version"
  • It shows the python version details

First python program with print() statement

  • open command prompt in windows and type python
  • Then type python command/code - Refer below image

Image description

Note:

Top comments (0)