I'm a beginner who just started Python. I'm going to make a Python file (saved by name hello.py) edit plus and run it on cmd
C:\Users\LG>cd C:\Python C:\Python>python hello.py
I typed "can't open file 'hello.py': [Errno 2] No soo file or directory. What should I do? The file was clearly stored in the c:\Python directory
python
What message do I get when I type the ls
command in C:\Python?
If you type the ls
command, and you don't see the phrase hello.py, the hello.py file is not in that directory.
Check if there is a typo in the file name or if there is a mistake in the extension.
In my case, I thought I saved hello.py, but in some cases hello.py.txt was saved.
© 2024 OneMinuteCode. All rights reserved.