Monday, December 8, 2014

Python Class 102 - Kapil Sharma

Number Types In Python: 

Integers: They are whole/natural numbers with +/- number range.
                e.g: -3,-2,-1,0,1,2,3

Floating Values: Numbers with decimal values. 
                          e.g: 7.77

Complex Values: Real numbers + Imaginary numbers. 
                            e.g: 7 + 7XY 

Boolean Values: 0 OR 1 #True OR False

Note: To find type of any number: 

>>> myValue = 5 #User enter a variable value.
>>> type(myValue) #Than user search for variable type.
>>> #Python shows that user value is integer.






Operators In Python: 

Unary (+,-,~)
Arithmetic (+,-,*,/,%,//,**)
Relational (==,!=,>,<,>=,<=)
Logical (and, not, or)
Bitwise (&,|,^,~,<<,>>)
Assignment (=,+=,-=,*=,/=,%=,**=,//=)
Membership (In, not in)

Identity (Is, is not)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Blockchain: 101 (By - Kapil Sharma)

 https://testing-mines.blogspot.com/2021/10/blockchain-101-by-kapil-sharma.html Blockchain through the following attributes: Distributed:  T...