Simple addition program. : integer « Data Type « Python Tutorial

Home
Python Tutorial
1.Introduction
2.Data Type
3.Statement
4.Operator
5.String
6.Tuple
7.List
8.Dictionary
9.Collections
10.Function
11.Class
12.File
13.Buildin Function
14.Buildin Module
15.Database
16.Regular Expressions
17.Thread
18.Tkinker
19.wxPython
20.XML
21.Network
22.CGI Web
23.Windows
Python Tutorial » Data Type » integer 
2.10.2.Simple addition program.
integer1 = 
integer2 = 2

sum = integer1 + integer2    # assignment of sum

print "Sum is", sum          # print sum
2.10.integer
2.10.1.To denote an octal literal, use 0 followed by a sequence of octal digits (0 to 7).
2.10.2.Simple addition program.
2.10.3.Compare integers using if structures, relational operators and equality operators.
2.10.4.X // Y: Floor division truncates fractional remainders down to their floor
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.