Step 1: Getting Started
Go to online-python.com. This is a free online Python editor where you can write and run code without installing anything.
Step 2: Your First Program
Type this code into the editor and press Run:
print("Hello, world!")
You should see the output Hello, world! at the bottom of the screen.
Step 3: Variables
Variables store information. Try this code:
name = "Alex"
print("Hello, " + name)
Change "Alex"
to your name and run it again!
Step 4: Input
We can ask the user for input:
favorite = input("What is your favorite color? ")
print("Nice! I like " + favorite + " too.")
Step 5: Mini Challenge
Write a program that asks for your name and your age, then prints: “Hello [name], you are [age] years old!”
Wrap-Up
Great job! 🎉 You’ve just learned how to print messages, use variables, and accept input in Python. Keep experimenting on online-python.com to build your skills.