After writing the Hello world code it seems that no other code that is written generates any output. What could I be doing wrong? It only generates anything on the first line.
Only seeing output on first line of code
Sorry for the late reply. No it doesn’t, it just shows the number of sec it took to give the code output
Like this, I know I’m supposed to see some output, how can I fix it?
Also it could give an output before then it just stopped, so I wonder what went wrong?
The general reason for this would be that if you’re using the Python
build system that ships with Sublime, you’re using the Syntax Check
variant of it.
That variant tells Python to only compile the code, but not run it. So the only output you will see is the time it took and, if your code is broken, an error that says why.
If you use Tools > Build With
, and pick Python
and not Python - Syntax Check
, the code would presumably run, so long as nothing has replaced the build system with something different.
That’s the issue, I’ve been using the option with just python, without the syntax check variant and it still doesn’t run the code. I think I should also inform that I have recently updated sublime following the prompt it gave. Maybe with this information you’d be able to help me pinpoint where exactly the problem lies
The file has been saved as new_assignment.py, it’s there in the screenshot.
Or maybe that’s not how I’m supposed to save the files??
You have made changes to the file since saving it, I can tell because the close button on the tab is a circle instead of an X.
The only different thing I remember doing deliberately, after creating the new assignment file, was typing in the code and attempting to run it. Nothing more. Is it possible you are familiar with this kind of issue that might have occurred??Perhaps you can help me solve it. Also, another new thing I did before creating that file was update sublime, nothing more. It was running before but then it just stopped. Your service would be greatly appreciated.
When you make a change to a file you need to save those changes before running it. You can do this automatically using Build > Save All on Build.
I did that, it worked. Thank you so much. I’ll try to keep in mind that I have to save any new changes I make to a file before I can run a code. Thanks again, stay well.