Hello, I just started Python programming and I have started experimenting with all the math operators, and I am trying to make the program add three user inputs, two of which are changed through operations into a new variable, and I want to add the two new variables with the last one. The error I am getting is the following:
Traceback (most recent call last):
File "D:\PythonCode\function.py", line 6, in <module>
print(a1+b1+c)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
Here is the code
a = int(input("Input your a variable ") )
a1 = print(int(a ** (2)))
b = int(input("Input your b variable ") )
b1 = print(int(b * a))
c = int(input("Input your constant ") )
print(a1+b1+c)
I apologize for the horrendous explanation, but it was the best I could do.
Thanks