How to Run Python From Command Prompt - How to Run Python Program in CMD - Execute Python File

Publié le: 19 février 2025
sur la chaîne: SoftTrick
21
1

In This Video We Will See How to Run Python From Command Prompt or How to Run Python Program in CMD or Execute Python File

Here Are The Steps to Run Python From Command Prompt or How to Run Python Program in CMD or Execute Python File

Method 1

1. Search Notepad
2. Click Notepad
3. Type Whatever Python Commands You Want To Type
4. Click File
5. Click Save As
6. Click Desktop
7. Set Save as type to All Files
8. Type Whatever Name You Want To Type in the End Type .py
9. Click Save Button
10. Right-Click on Py File We Just Created
11. Click Properties
12. Copy Location Under General Tab
13. Search CMD
14. Click Command Prompt
15. Type CD Space Then Paste The Location We Copied & Then Press Enter on Your Keyboard
16. Now Type python Space Name of the Python (py) file & Press Enter on Your Keyboard
17. Done!


Method 2

1. Right-Click on Python (Py) File
2. Click Properties
3. Copy Location Under General Tab
4. Search CMD
5. Click Command Prompt
6. Type CD Space Then Paste The Location We Copied & Then Press Enter on Your Keyboard
7. Now Type py Space Name of the Python (py) file & Press Enter on Your Keyboard
8. Done!


Sur cette page du site, vous pouvez voir la vidéo en ligne How to Run Python From Command Prompt - How to Run Python Program in CMD - Execute Python File durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur SoftTrick 19 février 2025, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 21 fois et il a aimé 1 téléspectateurs. Bon visionnage!