Win10 Import math issue - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Win10 Import math issue (/thread-9429.html) |
Win10 Import math issue - Oldsquid - Apr-08-2018 I've just started learning to program. I am running Win10, Python 3.6.4 When I type in the following: import math math.sqrt(16) I save and run it. I get a blank output. I should be getting 4. What am I doing wrong? RE: Win10 Import math issue - snippsat - Apr-08-2018 You need print() ,when running it as a script.import math print(math.sqrt(16))In interactive console(REPL) example ptpython(work perfect with cmder), IPython. It will execute without print() .C:\ λ ptpython >>> import math >>> math.sqrt(16) 4.0 RE: Win10 Import math issue - Oldsquid - May-12-2018 Thank you, I'll give it a try. Unfortunately, life is getting in the way of self-teaching / learning time. |