-2

I am new to python programming and was following a guide, writing a debugger. Then, when I tried to run it, it gave me this error: builtins.IndentationError: expected an indented block

def sum(number_one,number_two):
number_one_int = conver_integer(number_one)
number_two_int = conver_integer(number_two)

result = number_one_int + number_two_int 

return result

def convert_integer(number_string):

converted_integer = int(number_string)

answer = sum("1","2")   return converted_integer
azro
  • 53,056
  • 7
  • 34
  • 70
cryptical
  • 1
  • 1

2 Answers2

0

As this question only to resolve indentation error, your code should be as follows:

def sum(number_one,number_two):
    number_one_int = conver_integer(number_one)
    number_two_int = conver_integer(number_two)
    result = number_one_int + number_two_int
    return result

def convert_integer(number_string):
    converted_integer = int(number_string)
    return converted_integer

answer = sum("1","2")
bigbounty
  • 16,526
  • 5
  • 37
  • 65
0

The two lines below where you define the function need to be indented so they aren't flush against the edge. To do this in most IDEs take your curser to the first character on the left and press tab. This should cause the whole line to shift to the right. Do this to the second and third line and it should work.

BarryBBenson
  • 71
  • 1
  • 6