bluehost

Showing posts with label concepts. Show all posts
Showing posts with label concepts. Show all posts

Tuesday, 16 February 2021

Python Concepts For Beginners With Examples.

In this article, we are going to state step by step how you can understand python as a beginner. This is a simple production that will entail all basics of creating a simple program and mathematical calculations.
We are going to start by creating a simple program which displays "Hallow World". In python, we use the print('') statement to get output. The statement is usually put in between the brackets.
Print text.
Print('Hellow World')
Print('Hellow World!')
Print('Hellow World...')

Simple Calculations.
Python is also used to carry out calculations. 
Print(2+2)
Print(2+9)
Print(2+8-9)

Multiplication and Division.
We use asterisk * to indicate multiplication and a forward slash / to indicate division.
Print(2*2)
print(2*(3+4))
print(9/3)

Floats.
Floats are used in python to represent numbers that are not integers eg 0.7, -2.341.
They are created by entering a number with a decimal point or using division on interfering.
Print(4/7)
Print(0.56)
Print(5+2.3)
Print(7*8.0)

Exponentials.
In python, exponentials are created by raising a number to the power of another. The operation is done by using two asterisks**.
Print(4**4)
Print(7**(1/2))

Quotient.
In python, floor division is done using two forward slashes //.
Print(19//3)
Print(20//6)

Remainder.
A percentage symbol % is used to get the remainder of a division.
Print(19%3)
Print(20%6).

Results.
Follow me for the best level of python basics.
 

React vs Angular; Front-End Web Development

Angular and React  are two of the most popular Javascript tools for front-end development. React is a Javascript created by Meta...