I'm a huge beginner.
After entering the command as per the book Python, CC saved it as draw_tree.py
on the desktop, but typing $pythondraw_tree.py
on the terminal did not launch the title as per the book and did not write the diagram.I have made a lot of mistakes in thinking whether the file name is bad, the file is stored in a bad location, or whether there are typographical errors or omissions, but it is difficult to solve, so I will write it down.Please let me know if you are kind.
The file you created (tree.py) seems to have been saved to your desktop, but right after opening the terminal, you are in the home directory, so I think you can't find the file even if you run $python...
.
Where the file is stored
/User/Username/Desktop/draw_tree.py
location immediately after opening the terminal
/User/Username/
Run cd Desktop
at the terminal to move the directory, and then view the file list in ls
to see if you see the file you created.
Then try running pythondraw_tree.py
again.
© 2024 OneMinuteCode. All rights reserved.