WeThinkCode

WeThinkCode_ IDC Curriculum

Digital Inclusion Program

...

Your First Python Program

Python Basics

Python is a programming language that helps us communicate with computers. It's like giving instructions to a very smart assistant who can do math, organize data, and even create games or websites.

The print() Function

The most basic thing you can do in Python is display text on the screen. We use the print() function for this:

print("Hello, world!")

When you run this code, the computer will show: Hello, world!

Why Python?

  • Easy to read and write
  • Used by scientists, engineers, and programmers worldwide
  • Great for beginners and experts alike
  • Powers many popular applications like YouTube, Instagram, and Netflix

Remember

  • Python code is executed line by line
  • Functions like print() perform specific tasks
  • Text in quotes is called a "string"

Next, you'll write your own "Hello, World!" program!