Unit 1 · What is Python?! · Lesson 9 of 57
Brick by brick, line by line.
Back to square one.
Let's go back to that first example we wrote!
Let's say we want to print something afterwards. How do we do it?
If you guessed putting another print statement on the next line, you'd be correct!
On the next line (press Enter to go to the next line), try to output I love learning! to the console.
You may wonder why it has to go on the next line. That's just the way Python works!
Python reads your code and runs it one line at a time. Once it finishes with line 1, it moves on to line 2, then 3, then 4, and so on.
Make your program output I love learning! to the console!
Python exercise
Write the program in an editor next to the lesson, run it, and have it checked automatically. 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.