Displaying location, type and value for an int : Console Read « Development « Python






Displaying location, type and value for an int

Displaying location, type and value for an int
integer1 = raw_input( "Enter first integer:\n" )                        

integer1 = int( integer1 )                                              # convert the string to an integer
print "integer1: ", id( integer1 ), type( integer1 ), integer1

           
       








Related examples in the same category

1.Read numbers till eof and show squaresRead numbers till eof and show squares
2.Simple addition program.Simple addition program.
3.Displaying location, type and value for your input.Displaying location, type and value for your input.