DEV Community

Cover image for PYTHON FOR NEWBIES
Leah Ndirangu
Leah Ndirangu

Posted on

PYTHON FOR NEWBIES

GETTING STARTED

Python programming language is a high-level, general purpose language. It is written in human readable language and designed to solve a particular problem.
Python is suitable for but not limited to:

  • Web Development
  • Data Science
  • Machine Learning
  • Game Development
  • Data Engineering
  • Robotics
  • Automation

INSTALLING PYTHON

To install python visit: Python, scroll down to active releases to see which version is secure for download.
NOTE:
Python 2.7 is no longer in use.

Once you've settled on a specific version, select download to download
Take note of the operating system your machine uses before download.

Image description

Python on visual-studio and pycharm:

To get started with Python on Visual Studio, follow Getting Started with Python in VS Code and pycharm Get Started

WRITING YOUR FIRST PROGRAM

Python uses print function to output text. Print must be followed by a parenthesis which encloses the output we want to generate.

Arithmetic operators

Operator Description Syntax
+ Addition a+b
- Subtraction a-b
* Multiplication a*b
/ Division a/b
% Modulus a%b
// Quotient a//b
** Exponent a**b

Example:

Image description

Image description

Logic Operators

Operator Description Syntax
and True if both operands result is true a and b
or True if either operands result is true a or b
not True if both operands result is false a not b

REFERENCES

Python.org/downloads/
Jetbrains.com
visualstudio.com/docs/python/python-tutorial

Top comments (0)