Skip to main content

Python Introduction

 What is Python?

Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.


It is used for:

  • web development (server-side),
  • software development (mobile & desktop),
  • mathematics,
  • system scripting.


What can Python do?

  • Python can be used on a server to create web applications.
  • Python can be used alongside software to create workflows.
  • Python can connect to database systems. It can also read and modify files.
  • Python can be used to handle big data and perform complex mathematics.
  • Python can be used for rapid prototyping, or for production-ready software development.


Why Python?

  • Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
  • Python has a simple syntax similar to the English language.
  • Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
  • 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.
  • Python can be treated in a procedural way, an object-oriented way or a functional way.


Good to know

The most recent major version of Python is Python 3, which we shall be using in this tutorial. However, Python 2, although not being updated with anything other than security updates, is still quite popular.


It is possible to write Python in an Integrated Development Environment, such as Thonny, Pycharm, Netbeans or Eclipse which are particularly useful when managing larger collections of Python files.


Python Syntax compared to other programming languages

  • Python was designed for readability, and has some similarities to the English language with influence from mathematics.
  • Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.
  • Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly-brackets for this purpose.


Example

Our first program will be

print("Hello, YOUR NAME")

i.e print('Hello, Daniel')

Output:

    Hello Daniel

Comments

Popular posts from this blog

Physics - Scalers and Vectors

  Introduction to Vectors and Scalars We come into contact with many physical quantities in the natural world on a daily basis. For example, things like time, mass, weight, force, and electric charge, are physical quantities with which we are all familiar. We know that time passes and physical objects have mass. Things have weight due to gravity. We exert forces when we open doors, walk along the street and kick balls. We experience electric charge directly through static shocks in winter and through using anything which runs on electricity. There are many physical quantities in nature, and we can divide them up into two broad groups called vectors and scalars. Scalars and Vectors Scalars are physical quantities which have only a number value or a size (magnitude). A scalar tells you how much of something there is. Definition: Scalar A scalar is a physical quantity that has only a magnitude (size). For example, a person buys a tub of margarine which is labelled with a mass of 500g....

Mathematics - Numbers

  Numbers There are different types of numbers in the world. Each number is different from another, yet they may share some common characteristics. To help themselves keep track of and understand the similarities and differences between numbers, mathematicians have developed a grouping system that categorizes and describes numbers based on their characteristics. Some of the most common groups in the system are: Natural numbers Whole numbers Integers Rationals Real numbers Prime numbers Natural numbers The natural numbers are all the numbers that you learn when you're a baby, like 1, 2, 3, 4, 5, 6 and on and on. The natural numbers are also sometimes called the counting numbers because they're the first numbers you learn how to count. Zero is not a natural number. Whole Numbers The whole numbers are the natural numbers and zero. i.e 0, 1,2,3,4,5..... Integers Integers are a special group or category of numbers that: Consist of the set of numbers: {. . .-4, -3, -2, -1, 0, 1, 2, 3...

Chemistry - Separation Techniques

 A separation process or technique is a method that converts a mixture or solution of chemical substances into two or more distinct product mixtures. At least one of results of the separation is enriched in one or more of the source mixture’s constituents. In some cases, a separation may fully divide the mixture into pure constituents. Separations exploit differences in chemical properties or physical properties (such as size, shape, mass, density, or chemical affinity) between the constituents of a mixture. Processes and techniques are often classified according to the particular differences they use to achieve separation. If no single difference can be used to accomplish a desired separation, multiple operations can often be combined to achieve the desired end. With a few exceptions, elements or compounds exist in nature in an impure state. Often these raw materials must go through a separation before they can be put to productive use, making separation techniques essential for ...