Holla Tech - Learn

Using an Editor
 

So far, we’ve only used Python with the console, entering and running one line of code at a time.
Actual programs are created differently; many lines of code are written in a file, and then executed with the Python interpreter.

In IDLE, this can be done by creating a new file, entering some code, saving the file, and running it. This can be done either with the menus or with the keyboard shortcuts Ctrl-N, Ctrl-S and F5.

Each line of code in the file is interpreted as though you entered it one line at a time at the console. 

x = 7
x = x + 2
print(x

 

Result: 

Holla Tech - Learn Python

Python source files have an extension of .py

NOTE!
You can run, save, and share your Python codes on our Code Playground, without installing any additional software. Reference this lesson if you need to install the software on your computer.

BACK NEXT

CLICK ON THE BUTTON BELOW TO GO TO THE PYTHON MAIN COURSE PAGE. 

PYTHON MAIN COURSE PAGE

 


©️ License: All Rights Reserved 


CONTACT HOLLA TECH – LEARN SUPPORT