Can any of you guys take a look at my code and give me some pointers on why is not working?
here’s the code:
<p>
def menu():
print("Bienvenido, Que operacion deseas realizar?")
print("1.-Suma\n2.-Resta\n3.-Division Decimal\n4.-Division Entera\n\
5.-Multiplicacion\n6.-Exponencial\n7.-Salir")
class oper:
def __init__(self, nombre):
self.Nombre = nombre
def suma(self, num01, num02):
print(num01 + num02)
def resta(self, num01, num02):
print(num01 - num02)
def divdec(self, num01, num02):
print(num01 / num02)
def divent(self, num01, num02):
print(num01 // num02)
def multiplicacion(self, num01, num02):
print(num01 * num02)
def exponencial(self, um01, num02):
print(num01 ** num02)
while True:
menu()
entrada = []
option = input("Selecciona la operacion: ")
num01 = input("Ingresa el primer numero: ")
num02 = input("Ingresa el segundo numero: ")
entrada.insert(0, option)
entrada.insert(1, num01)
entrada.insert(2, num02)
entrada = [int(option), float(num01), float(num02)]
print(entrada)
math = oper("Operacion Matematica")
while entrada[0] != 7:
if entrada[0] == 1:
math.suma(entrada[1], entrada[2])
elif entrada[0] == 2:
math.resta(entrada[1], entrada[2])
elif entrada[0] == 3:
math.divdec(entrada[1], entrada[2])
elif entrada[0] == 4:
math.divent(entrada[1], entrada[2])
elif entrada[0] == 5:
math.multiplicacion(entrada[1], entrada[2])
elif entrada[0] == 6:
math.exponencial(entrada[1], entrada[2])
elif entrada[0] == 7:
entrada = [int(option), float(num01), float(num02)]
while True:
dnuevo = input("Correr de Nuevo? (s/n):")
if dnuevo in ("s", "n"):
break
print("Respuesta no valida")
if dnuevo == "s":
continue
else:
print("Gracias por utilizar este programa")
break
</p>
If i try to run this i get the next error message
IndentationError: expected an indented block (, line 2)
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>
) will also add backticks around text.
Note: Backticks are not single quotes.

Like this?
def menu():
print("Bienvenido, Que operacion deseas realizar?")
print("1.-Suma\n2.-Resta\n3.-Division Decimal\n4.-Division Entera\n\
5.-Multiplicacion\n6.-Exponencial\n7.-Salir")
class oper:
def __init__(self, nombre):
self.Nombre = nombre
def suma(self, num01, num02):
print(num01 + num02)
def resta(self, num01, num02):
print(num01 - num02)
def divdec(self, num01, num02):
print(num01 / num02)
def divent(self, num01, num02):
print(num01 // num02)
def multiplicacion(self, num01, num02):
print(num01 * num02)
def exponencial(self, um01, num02):
print(num01 ** num02)
while True:
menu()
entrada = []
option = input("Selecciona la operacion: ")
num01 = input("Ingresa el primer numero: ")
num02 = input("Ingresa el segundo numero: ")
entrada.insert(0, option)
entrada.insert(1, num01)
entrada.insert(2, num02)
entrada = [int(option), float(num01), float(num02)]
print(entrada)
math = oper("Operacion Matematica")
while entrada[0] != 7:
if entrada[0] == 1:
math.suma(entrada[1], entrada[2])
elif entrada[0] == 2:
math.resta(entrada[1], entrada[2])
elif entrada[0] == 3:
math.divdec(entrada[1], entrada[2])
elif entrada[0] == 4:
math.divent(entrada[1], entrada[2])
elif entrada[0] == 5:
math.multiplicacion(entrada[1], entrada[2])
elif entrada[0] == 6:
math.exponencial(entrada[1], entrada[2])
elif entrada[0] == 7:
entrada = [int(option), float(num01), float(num02)]
while True:
dnuevo = input("Correr de Nuevo? (s/n):")
if dnuevo in ("s", "n"):
break
print("Respuesta no valida")
if dnuevo == "s":
continue
else:
print("Gracias por utilizar este programa")
break
def menu():
print("Bienvenido, Que operacion deseas realizar?")
print("1.-Suma\n2.-Resta\n3.-Division Decimal\n4.-Division Entera\n\
5.-Multiplicacion\n6.-Exponencial\n7.-Salir")
class oper:
def __init__(self, nombre):
self.Nombre = nombre
def suma(self, num01, num02):
print(num01 + num02)
def resta(self, num01, num02):
print(num01 - num02)
def divdec(self, num01, num02):
print(num01 / num02)
def divent(self, num01, num02):
print(num01 // num02)
def multiplicacion(self, num01, num02):
print(num01 * num02)
def exponencial(self, um01, num02):
print(num01 ** num02)
while True:
menu()
entrada = []
option = input("Selecciona la operacion: ")
num01 = input("Ingresa el primer numero: ")
num02 = input("Ingresa el segundo numero: ")
entrada.insert(0, option)
entrada.insert(1, num01)
entrada.insert(2, num02)
entrada = [int(option), float(num01), float(num02)]
print(entrada)
math = oper("Operacion Matematica")
while entrada[0] != 7:
if entrada[0] == 1:
math.suma(entrada[1], entrada[2])
elif entrada[0] == 2:
math.resta(entrada[1], entrada[2])
elif entrada[0] == 3:
math.divdec(entrada[1], entrada[2])
elif entrada[0] == 4:
math.divent(entrada[1], entrada[2])
elif entrada[0] == 5:
math.multiplicacion(entrada[1], entrada[2])
elif entrada[0] == 6:
math.exponencial(entrada[1], entrada[2])
elif entrada[0] == 7:
entrada = [int(option), float(num01), float(num02)]
while True:
dnuevo = input("Correr de Nuevo? (s/n):")
if dnuevo in ("s", "n"):
break
print("Respuesta no valida")
if dnuevo == "s":
continue
else:
print("Gracias por utilizar este programa")
break