def read_integer(prompt): """Read an integer from the user and return it.""" input = raw_input(prompt) return int(input) num = read_integer("Type a number: ") print "One more is", num+1 num = read_integer("Type another: ") print "One less is", num-1