I'm trying to make a really simple command-based python script, and get commands from the terminal's input, but it's not detecting the value of the variable... I'm not good at explaining, so here's my code:
a = 0
b = 0
class commands:
def add():
a = int(input("first number "))
b = int(input("second number "))
print(a + b)
commander = commands
cmd = input("what command ")
commander.cmd()
When I run it, it gives me an error saying Exception has occurred: AttributeError
type object 'commands' has no attribute 'cmd'
I'm still relatively new to Python, so sorry if it's something really obvious. Thank you, and any help is appreciated.