Thursday, May 6, 2021

Number

Number (data type)

       1.Int  = Signed integer 
          Ex :- a=10

       2.Long = (L) long integers, they can also be                represented in octal and hexadecimal.
          Ex :- b= 345L

       3.Float = (.)floating  point and real values.
          Ex :- c= 45.67

       4.Complex = (J) contains integer in the                      range  0 to 255
           Ex :- d = 3.14J

 type() function is used to find  data type in   Python

Example  :-
                  a= 10
                  type(a)
                  b= 231L
                  type(b)
                  c= 48.23
                  type(c)
                  d = 45.7J
                  type(d)





No comments:

Post a Comment

String

  String (data type) :  》 Strings are arrays of bytes representing Unicode characters. 》A string is a collection of one or more characters p...