🐍 Your First Day with Python!

Learn to code step by step

Step 1: Your First Program (Hello World)

Welcome! Let's write your first program. In programming, we use print() to display messages on the screen.

Try this code:
print("Hello World")

What to do:

1. Look at the code editor on the right →

2. Type: print("Hello World")

3. Click the green "Run Code" button

4. See the result in the black output box!

💡 Tip: Text must be inside quotation marks " "

Try these too:

print("I love pizza")
print("Today is my first day coding!")

Step 2: Printing Multiple Lines

You can write multiple print() statements to display several lines!

Try this:
print("Welcome to my program!")
print("This is line 2")
print("This is line 3")

You can also print multiple things on one line by separating them with commas:

print("I like", "pizza", "and", "ice cream")
💡 Tip: Each print() statement creates a new line automatically!

Step 3: Variables (Storing Information)

Variables are like boxes that store information. You can save data and use it later!

Try this:
name = "Alex"
print(name)

You can store different types of information:

name = "Alex"
age = 15
print("My name is", name)
print("I am", age, "years old")
💡 Remember: Text needs quotes " ", but numbers don't!

Step 4: Getting User Input

Now let's make your program interactive! The input() function asks the user a question.

Try this:
name = input("What is your name? ")
print("Hello", name)

What will happen:

1. Click "Run Code"

2. A black input box will appear below

3. Type your name and press Enter

4. See your personalized greeting!

💡 Cool! Your program is now talking to you!

Step 5: Your First Game! 🎮

Let's create an Adventure Game where YOU make the choices!

print("=== Adventure Game ===")
print()
name = input("What is your name? ")
print("Welcome,", name, "!")
print()
weapon = input("Choose weapon (sword/bow/magic): ")
print("You picked", weapon, "!")
print()
place = input("Where to go (forest/castle/cave)? ")
print(name, "goes to the", place, "with", weapon)
print("Your adventure begins! 🎉")

Try it! Run the code and answer each question. Watch as your story unfolds!

Step 6: Make Your Own!

Now it's your turn to be creative! Here are some ideas:

Fortune Teller Game:
print("🔮 Fortune Teller 🔮")
name = input("Your name? ")
color = input("Favorite color? ")
number = input("Lucky number? ")
print(name, ", your lucky color is", color)
print("Your lucky number is", number)

Other fun ideas:

• Create Your Superhero

• Design Your Dream Room

• Plan Your Perfect Day

• About Me Profile

🌟 You're a programmer now! You can create anything you imagine!
Code Editor
Output