How to Save Your Python Code to a File and Run It as a Script | Python Tutorial for Beginners

preview_player
Показать описание
In this video, we will learn how to save our Python code to a file and how to run it as a script using IDLE.

0:00 Introduction
0:31 What do we need?
0:50 The advantage of an IDE over a Plain Text Editor
0:59 What is debugging?
1:22 IDLE - Integrated Development Learning Environment
1:34 How to launch IDLE on a Mac
1:40 How to launch IDLE on Windows
1:48 IDLE's Python Interactive Shell
2:25 Creating a new file in IDLE
2:40 Writing our first Hello World program in Python
3:39 How to save a Python file in IDLE
4:45 How to run a Python file in IDLE
5:47 How a Hello World program in Java looks like
6:05 How to open a Python file in IDLE (Windows)
6:15 How to open a Python file in IDLE (Mac)

Find all our Python Programming for Beginners videos here and start learning how to code:

#Python #LearnPython #PythonProgrammingTutorial
Рекомендации по теме
Комментарии
Автор

Thank you very much, I've looking for this for several days, well wishes for you from Dhaka Bangladesh.

mofakkerulislam
Автор

Thank you soo much for this, I watched too many videos to admit but this one was really helpful

DarkSolarMatter
Автор

Thanks so much. Very easy to understand and follow.

jallahkennedy
Автор

Thank you I saved 10 marks because of your video

glitchedfire
Автор

thanks for posting this, it was really helpful :-)

makiluvr
Автор

It doesn´t appear "edit with IDLE", and I don´t like other way to open the file. help

jacobovillegas
Автор

How can I see that menu bar (File, View, Run...) in order to create and save a new document? I installed Python 3.10 but don't see an option to enable it. My console doesn't say Python Shell either. Thanks.

techtutorialsbyhenry
Автор

I have a problem. When i saved the code and open it. Just showing hello world file

laalaabaalaa
Автор

Test Your Knowledge: IDLE is an IDE bundled with the Python installer from python.org. What does IDLE stand for?

choobtorials
Автор

Much appreciated. I feel like an infant.

improve_insight
Автор

I have win 11 and python 3.1'0, and all worked out, except when I right click on the saved file, I do not get the edit with IDLE option, any advice????

PaTrick-cfev
Автор

why is the python file saving as a pdf, nd whn i open the pdf it says the file is not supported

harismitaa
Автор

thanks sir, can you pls make a video on "how to make a person to run our python script"...sry I'm a beginner;-;

sebastian-mqbk
Автор

I have a problem. When I save the file as (python file), it is somehow saved as a notepad!

prince_m_h_d
Автор

Now I’m ducking max, my professor is being unreasonable with my work and saying the file he asked for isn’t good enough.

anondabomb
Автор

I want to hack free fire can u help me

tjsofficial-
Автор

Traceback (most recent call last):
File "C:\Program Files\Python39\lib\site-packages\pyttsx3\__init__.py", line 20, in init
eng = _activeEngines[driverName]
File "C:\Program Files\Python39\lib\weakref.py", line 134, in __getitem__
o = self.data[key]()
KeyError: 'sapi5'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/HP/Bee.py", line 9, in <module>
engine = pyttsx3.init('sapi5')
File "C:\Program Files\Python39\lib\site-packages\pyttsx3\__init__.py", line 22, in init
eng = Engine(driverName, debug)
File "C:\Program Files\Python39\lib\site-packages\pyttsx3\engine.py", line 30, in __init__
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "C:\Program Files\Python39\lib\site-packages\pyttsx3\driver.py", line 50, in __init__
self._module =
File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Program Files\Python39\lib\site-packages\pyttsx3\drivers\sapi5.py", line 10, in <module>
import pythoncom
File "C:\Program Files\Python39\lib\site-packages\pythoncom.py", line 2, in <module>
import pywintypes
ModuleNotFoundError: No module named 'pywintypes'
>>>

Brother why I am getting this error

rakshakmathur