JOBS ESTATE FREE EMAIL ALERTS

Numbers:In Python Numbers are Immutable(Cannot change old value when the object creates in memory,it create again new value).

 x=10                                             oxn12

 x=x+1                                              oc34

 

  • Integers
  1. i) Plain Integers:-

     Universal Numeric:

                 Decimal(x=starts with 1),octal base 8(x=0),Hexadecimal base 16(x=0x or x=0X)

  1. ii) Long:- range depends on virtual memory

                 ex: x=99999999L

  

  • Floating Point Real Numbers:- equivalent to double in C language.

                     x = 1.25

                     y = 1.45E+12

                     z = float(10)

                    

  • Complex Numbers:-

X = 1 + 2J

print(x.real);       1.0

print(x.imag);     2.0

print(x.conjugate());   (1-2j)



© Copyright 2020 Jobs Estate All Rights Reserved