Python is a high-level, general-purpose programming language. Beginner python programming it’s very easy and suitable language and also for experienced programmers compare to other programming languages like C++ and Java.
Python is a very popular programming language used in web development, Machine Learning programming application,along with all cutting edge technology in Software Industry.
What is a Variable in Python?
Data or values can be stored in temporary storage spaces called variables.
How do I store data?
Example:- “John” “123” “xyz”
What are the data types in Python?
In python programming every variable is associated with a data type.
What are the different types of data in Python?
Data Types | Explanation | Examples | |
Strings | Text – anything between ” ” becomes string | “Hello!”, “23.34” | |
Integers | Whole numbers | 5364 | |
Floats | Decimal Numbers | 3.1415 | |
Booleans | Truth values represent Yes/No | True, False | |
Lists | A collection of data, sits between [ ] | [1,2,3,4,5] | |
Tuples | A collection of data, sits between ( ) | (1,2,3,4,5) | |
Dictionaries | A collection of data, sits between { } | {“a”:1, “b”:2, “c”:3} |
Practical example for Beginner Python…
What are operators in Python?
Operators in python are special symbols in Python that carry out arithmetic or logical and relational computation.
- Arithmetic Operators
- Logical Operators
- Relation Operator
What is Arithmetic Operators?
Arithmetic operators are using mathematical operations like subtraction, addition, multiplication, etc.
Operator | Name | Example |
+ | Addition | x + y |
– | Subtraction | x – y |
* | Multiplication | x * y |
/ | Division | x / y |
% | Modulus | x % y |
** | Exponentiation | x ** y |
// | Floor division | x // y |
Beginner Python Practical Example:-
What is Logical Operators?
Logical operators are using for combine conditional statements.
Operator | Name | Example |
== | Equal | x == y |
!= | Not equal | x != y |
> | Greater than | x > y |
< | Less than | x < y |
>= | Greater than or equal to | x >= y |
<= | Less than or equal to | x <= y |
Beginner Python Practical Example:-
What is Relation Operator ?
Comparison operators are using for compare two values.
Operator | Name | Example |
== | Equal | x == y |
!= | Not equal | x != y |
> | Greater than | x > y |
< | Less than | x < y |
>= | Greater than or equal to | x >= y |
<= | Less than or equal to | x <= y |