Antoni Parellada
Antoni Parellada

Reputation: 4801

Math command fails to produce output on PyCharm

Completely new to python, I'm trying to get the math packages included in anaconda to work.

If I run a math command in IP Notebook, I get the right answer:

enter image description here

But under the same settings, if I run the equivalent command on a .py file on PyCharm nothing happens:

enter image description here enter image description here

It can be a very, very basic misunderstanding of how to run code in .py on the console within PyCharms, but I don't know the answer.

Upvotes: 2

Views: 429

Answers (1)

MB-F
MB-F

Reputation: 23647

The results of expressions in a Python script are not normally printed - this is a feature of the interpreter and the notebook. In a script it would not make much sense to compute x * y and do nothing with it.

Try this instead: print(3j * 9)

Upvotes: 2

Related Questions