Hello Guys,
In previous tutorial you learned about python , python feature , Installation , python IDE , python basics. In python basic you learned about modules , pip , Comments.
In this tutorial you will learn below points:
- Variables
- Data Types
- Operators
- type() function
- Typecasting
- input() function
Let's get started.
Variables
A Variables is reserved memory location to store values. In other words, A variables is the name given to a memory location in a program.
Creating Variables:
Python has no command for declaring a variable. A variable is created the moment you first assign a value to it.
Rules for defining variables:
1. A Variable name can only start with an alphabet and underscore.
2. A Variable name can contain alphabets , digits and underscore.
3. A Variable name can't start with a digit.
4. No While Space is allowed to be used inside a variable name.
5. Also applies to other identifiers.
Data Types
- Integer
- Float
- String
- Boolean
- None
Python is a superb language that automatically identifies the type of data for us.
Operators
- Arithmetic Operators
- Assignment Operators
- Comparison Operators
- Logical Operators
Arithmetic Operators :
Assignment Operators :
Comparison Operators :
Logical Operators :
type() function :
Typecasting :
input() function :
- This function allows the user to take input from the user as string.
- This function return output of input is always a String.
0 Comments