+ 1

Why doesn't the code "print(1+3) /2" work?

The error I receive is the following: Traceback (most recent call last): File "..\Playground\", line 5, in <module> print(1+3) /2 TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

18th Sep 2017, 4:30 PM
Canen Mccaslin
Canen Mccaslin - avatar
7 Answers
+ 15
print((1+3)/2) should work
18th Sep 2017, 4:32 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 1
That makes complete sense. I will avoid the same mistake in future code. Thank you for the correction!
18th Sep 2017, 4:35 PM
Canen Mccaslin
Canen Mccaslin - avatar
- 1
Its: print(1+3)/2)
19th Sep 2017, 9:33 AM
aiden