Dec-02-2017, 08:17 PM
Hello,
I am just new to Python and learning from scratch. Could anyone please help me solve this equation?
my code is:
the result i would like to see is:
Lijn 1
Lijn 2
Lijn 3
3
Best regards,
Koen
I am just new to Python and learning from scratch. Could anyone please help me solve this equation?
my code is:
>>> print("Lijn 1\nLijn 2\nLijn 3\n") + print(int("1")+ int("2"))
Output:Lijn 1
Lijn 2
Lijn 3
3
Error:Traceback (most recent call last):
File "<pyshell#215>", line 1, in <module>
print("Lijn 1\nLijn 2\nLijn 3\n") + print(int("1")+ int("2"))
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
>>>
So actually the result is there, but why am i getting an error message? is the syntax wrong?the result i would like to see is:
Lijn 1
Lijn 2
Lijn 3
3
Best regards,
Koen