Define and use int : Int « Data Type « Python






Define and use int

Define and use int
 
a = 3           # name created
b = 4

print b * 3, b / 2        # multiplication (4*3), division (4/2)

           
         
  








Related examples in the same category

1.Int: modulus (remainder), power Int: modulus (remainder), power
2. A value as a condition A value as a condition
3.Define and use integerDefine and use integer
4.Int value demoInt value demo
5.Convert String to integer (int)
6.Using Python as a Calculator
7.oct and hex function
8.int function
9.convert integers to octal and hexadecimal strings with a string formatting expression:
10.Compare integers using if structures, relational operators and equality operators.Compare integers using if structures, relational operators and equality operators.