Simple addition program.

2019-06-16 02:08栏目:技术创新
TAG:

# prompt the user for input
integer1 = raw_input( 'Enter first integer:n' )  # read a string
integer1 = int( integer1 )                        # convert the string to an integer

integer2 = raw_input( 'Enter second integer:n' ) # read a string
integer2 = int( integer2 )                        # convert the string to an integer

sum = integer1   integer2                         # assignment of sum

print 'Sum is', sum                               # print sum

版权声明:本文由新浦京娱乐站_新浦京娱乐场官网_新浦京娱乐发布于技术创新,转载请注明出处:Simple addition program.