Python Tutorial for Beginners 7 – Creating and Executing your First Python Script (Run .py file)

///Python Tutorial for Beginners 7 – Creating and Executing your First Python Script (Run .py file)

Python Tutorial for Beginners 7 – Creating and Executing your First Python Script (Run .py file)

FavoriteLoadingAdd to favorites

In this video I am going to show How to Create, Save, Run a Python .py file. This video will also give the answer to the question which is , How do I run a Python program on a terminal or without any IDE/ Editor?.
We an write Python scripts in text files with the suffix .py. First you need to save python codes in hello.py file? The scripts can be read by the interpreter in several ways:

Examples:
you can directly double click on you .py (e.g. hello.py) file and it will open in the terminal.

$ python hello.py

# This will simply execute the script and return to the terminal afterwards

$ python -i hello.py

# The -i flag keeps the interpreter open after the script is finished running

$ python

execfile(‘hello.py’)

#PythonTutorialforBeginners #ProgrammingKnowledge #LearnPython #PythonCourse
★★★Top Online Courses From ProgrammingKnowledge ★★★
Python Programming Course ➡️ ⚫️
Java Programming Course ➡️ ⚫️
Bash Shell Scripting Course ➡️ ⚫️
Linux Command Line Tutorials ➡️ ⚫️
C Programming Course ➡️ ⚫️
C++ Programming Course ➡️ ⚫️
PHP Programming Course ➡️ ⚫️
Android Development Course ➡️ ⚫️
C# Programming Course ➡️ ⚫️
JavaFx Programming Course ➡️ ⚫️
NodeJs Programming Course ➡️ ⚫️
Jenkins Course For Developers and DevOps ➡️ ⚫️
Scala Programming Tutorial Course ➡️ ⚫️
Bootstrap Responsive Web Design Tutorial ➡️ ⚫️
MongoDB Tutorial Course ➡️ ⚫️
QT C++ GUI Tutorial For Beginners ➡️

★★★ Online Courses to learn ★★★
Get 2 FREE Months of Unlimited Classes from skillshare –
Data Science – |
Machine Learning – |
Artificial Intelligence – |
MERN Stack E-Degree Program – |
DevOps E-degree – |
Data Analytics with R – |
AWS Certification Training – |
Projects in Java – |
Machine Learning With TensorFlow – |
Angular 8 – Complete Essential Guide –
Kotlin Android Development Masterclass –
Learn iOS Programming Building Advance Projects –

★★★ Follow ★★★
My Website –

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!

source

By |2019-11-05T23:47:00+00:00November 5th, 2019|Python Video Tutorials|24 Comments

24 Comments

  1. Parmo November 5, 2019 at 11:47 pm - Reply

    when i open it it just pops up some kind of cmd prompt?

  2. MrFlytime13 November 5, 2019 at 11:47 pm - Reply

    you explain it very well and easy to understand, thank you ! + 1 Follower

  3. Abin Sebastian November 5, 2019 at 11:47 pm - Reply

    Thank you for this information 👍, it will help beginners like me

  4. Powerbeast50 November 5, 2019 at 11:47 pm - Reply

    Say hello.py file one more time

  5. Michael Gusti November 5, 2019 at 11:47 pm - Reply

    i dont have any menu bar….how?

  6. The Binklem Network November 5, 2019 at 11:47 pm - Reply

    Great improvement in attitude loving the videos!

  7. grhayes November 5, 2019 at 11:47 pm - Reply

    If you installed python properly on your system you don't need to type python and the directory of the file you can run the file by typing the file name in the directory it is in.

  8. birch cliff November 5, 2019 at 11:47 pm - Reply

    Thank you so much for this video. I had python downloaded on my computer for a long time but wasn't able to get around to start learning. This video has helped me do that

  9. firefoxo November 5, 2019 at 11:47 pm - Reply

    How do I run a Python Shell?? Yours has a menu and everything.

  10. Nicolas Soto November 5, 2019 at 11:47 pm - Reply

    What makes this a script and not just a regular program?

  11. aditya miskin November 5, 2019 at 11:47 pm - Reply

    i did not understand why in 2:35 he changed it to float. When i ran the code without float it worked fine.Then what is the problem?

  12. Dextiery November 5, 2019 at 11:47 pm - Reply

    1st
    2st
    3st
    Nice

  13. Musa Toktaş November 5, 2019 at 11:47 pm - Reply

    Allah sizi bildigi gibi yapsin nasil bir ingilizce o ya

  14. πΦø P文ərəƙ November 5, 2019 at 11:47 pm - Reply

    4:02 3st number???

  15. Phenomenon Fish November 5, 2019 at 11:47 pm - Reply

    amazing, thanks

  16. Bu Wei November 5, 2019 at 11:47 pm - Reply

    Great!

  17. siddarth kothur November 5, 2019 at 11:47 pm - Reply

    Thankyou!

  18. Abhinav Rao November 5, 2019 at 11:47 pm - Reply

    hello,i have installed python exactly as u instructed but in cmd prompt when i type python its coming as 'python' is not recognized as an internal or external command,
    operable program or batch file.

    what to do??
    please help!!

  19. Sig Shooter November 5, 2019 at 11:47 pm - Reply

    My command prompt doesn't recognize python as an internal or external command…This is always where I stop watching these kind of videos

  20. Jackson Tetmeyer November 5, 2019 at 11:47 pm - Reply

    1st, 2st, 3st lol

  21. Samah AB November 5, 2019 at 11:47 pm - Reply

    Thanks for your video

  22. jai hind November 5, 2019 at 11:47 pm - Reply

    tq

  23. ANKIT DUBEY November 5, 2019 at 11:47 pm - Reply

    Thank you for starting python tutorials.. I've been waiting for them for long time now 😁

  24. Rajan Srivastava November 5, 2019 at 11:47 pm - Reply

    I have over 10Yrs exp in Oracle Database;; I know only PLSQL, Unix and Information,,, i want to make my career as a Data Scientist ;;I started learning Python on Youtube, and I have a good command on this;; and believe me your way of teaching inspires me to awake whole night and go through your all videos;;its very informative and simple way to understand ;;Can you please Suggest me what others technologies I need to learn to become a good Data scientist

Leave A Comment

*