DEV Community

Cover image for GETTING STARTED WITH PYTHON (BEGGINNER)
Stanley Wekesa
Stanley Wekesa

Posted on

GETTING STARTED WITH PYTHON (BEGGINNER)

Python is an easy to learn and use programming language developed on 20th February,1991 by Guido van Rossum.

Ease to learn and use python is made possible by the fact that;

  • Python is a high-level programming language. It uses an English-like syntax to write short likes of code that make coding easier and faster.
  • With python, as we will learn later, a programmer does not need to declare a variable with its data type. Python automatically assigns a data type depending on the value assigned to a variable.
  • Python is free and open-source.
  • You can download the source code, modify it and distribute your own version of python.
  • Being an interpreted language, python directly executes code line by line.
  • With the stated features, programmers get ample time to increase their productivity rather than spending time on understanding the language.

The drive to get to learn a new language is at its peak when you as a starting programmer has a long-term goal. This will act as great motivation to dig deeper into your preferred language.

Mastery of Python programming language opens doors to many professional fields and applications.
If you are interested in venturing in web development, game development, machine learning, data science and GUI development then python programming is one of the best options for you.

Now we have our goals set, let's dive into some of the basic concepts.

PYTHON
The language’s name isn’t about snakes, but about the popular British comedy troupe Monty Python. Guido, the founder of the language himself is a big fan of Monty Python’s Flying Circus.

** Variables and data types in Python**.

Variables are containers for storing data values.
In Python, variables are created the moment you first assign a value to it and are declared without a data type e.g.
x = 5

Types of variables.
local variables - variables used inside a function.
Global variables - variables declared outside a function and can be used by a number of functions.

Data types

  • Integer - these are values that return an integer value. type int.
  • float - these are values with a decimal part e.g. 15.15
  • String - Strings are a combination of characters in double or single quotes.

  • Boolean - are instances that return true or false/ yes or no.

Operators

  • Arithmetic operators – these operators are used to perform basic mathematical operations such as - +,-,*, /, %.
  • Comparison operators – operators used on two values returning a Boolean value. They are - ==, <, >, >=, <=, !=.
  • Logical operators – operators used to combine values that result in Boolean values. They include: - AND, OR, NOT
  • Assignment operators – these are operators used to assign values to a variable. They are: - ==, -=, +=, =, ++, --.

With that as a beginner, you can create programs and grow step by step to pro level.

                         **ALL THE BEST**
Enter fullscreen mode Exit fullscreen mode

Top comments (0)