Unit 1 · What is Python?! · Lesson 2 of 57
How does one Python?
How does one Python?
Python, like most programming languages, needs to be installed on your computer before you can use it.
However, we're able to provide you an online Python environment from the generosity of our hearts <3
⚠️ Just try not to blow it up please!
Running a Python file
Specifically in Linux, to run a Python file, use the following command:
python3 helloworld.py
On Windows, you can often just use py or python, and it's the same!
Here's what's going on:
python3is the command we're runninghelloworld.pyis the file we want to run
What's with the .py?
Notice helloworld.py ends with a .py extension. This is the best way to identify a file as a Python file.
Your turn!
Run the helloworld.py file to complete this lesson!
Tasks to do
Do each one in the terminal or on your practice VM, and it checks itself off. Create a free account to do this part.
Live Linux terminal
This lesson comes with a real Ubuntu machine that runs in your browser, so you type every command yourself. Create a free account to do this part.
Do this lesson for real
With a free account you get the terminals, challenges and checks that go with the lessons in Intro to Python, and your progress is saved as you go. CyberAcad is a 501(c)(3) nonprofit, so there is nothing to pay.