0
can not run python on sublime text
Anyone can help me. I am a beginner. I can not run code like 2 + 3 on subline text. but other codes like print can do.
11 Respuestas
+ 1
what do you mean by run on sublime text? python codes are run by the python interpreter. could you give specific code that fails and tell us how you are trying to run the code
+ 1
Ming Lu
maybe you are trying to see the output of code written using sublime text.
Maybe you see the output of prints but not the output of expressions like:
2 + 3
The problem: None!
expressions like that are interpreted and printed out only in the interactive interpreter.
+ 1
if you don‘t print the result nothing will be printed, seeing the result of your expressions is a feature that is only in the interactive python sessions
+ 1
run this in sublime:
print(5+3)
0
Hi, thanks for your reply. In terminal on Mac, I can use 2 + 3 and then press Enter, the result is 5. I can not do it the same way in Sublime Text
0
Python 3 has been already added to sublime text
0
And I pressed Command + B in Sublime Text.
0
So it means this kind of calculation can not run in Sublime text?
0
Ming Lu you just have to print the result
0
Then, can you tell me how to do such calculation and print the result in Sublime text? thanks a lot.
0
Got it. Thanks very much.