In this tutorial, we w’ll learn how to convert one data type to another data type and mathematical operations.
Any numeric types variable can be created when you assign a numeric value to them:
X = 1 #Int Y = 1.0 #Float Z = 1j #Complex
You can check the type of variable using the type() function.
Let’s discuss Numeric Types variables in details
An integer can be a positive or negative whole number. It should not contain any decimal point.
x = 1 y = 304234409238 z = -8098898
A float can be a positive or negative number containing one or more decimals.
x = 9.60 y = 4.0 z = -56.77
A complex number is written as X+iJ, where i is the imaginary part.
x = 3+2j y = 10j z = -933i