Continuation to old doubt

A batch file is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file. A batch file may contain any command the interpreter accepts interactively and uses constructs that enable conditional branching and looping within the batch file, such as IF, FOR, and GOTO labels. The term “batch” is from batch processing, meaning “non-interactive execution”, though a batch file may not process a batch of multiple data.

SORRY, I HAVE TO ADD THIS BUT THE BODY IS QUITE SIMILAR TO LAST ONE BECAUSE IT IS A CONTINUATION AND I HAVE TO POST 2 IMAGES BUT THAT LUXURY IS NOT FOR NEW USERS.SO DOING THIS.

2nd Image of the previous doubt that I am trying to initiate a connection between two. the above image shows a text file that has given status to the .py file. As you can see no run option what should I do?

Thank You!

Hi @sarthakagg105
To run the given text file

  • Save your text fle as “filename.py” file
  • Type cd Path_to_folder_where_filename.py_is_located and hit Enter. It should take you to the folder where your “filename.py” is stored.
  • Type dir and you should see the file filename.py .
  • To run the program, type python filename.py and hit Enter.
  • You should see the 40 as the ouput in your command prompt
  • Congratulations, you have run your Python program.

Hope this might helps :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Indeed I understand. I was saying to execute the file while the cmd is connected to jupyter notebook as you answered above and will do that. Thanks