Welcome to AI Coding

Lesson 1: Welcome to AI Coding

Learning Objectives

By the end of this lesson, students will be able to:

  • Understand what coding is.
  • Explain how coding and AI work together.
  • Recognize examples of AI they use every day.
  • Write their first simple Python program.

What Is Coding?

Coding is the process of giving instructions to a computer.

Just as we give instructions to people, computers also need clear instructions to perform tasks.

For example:

Human Instruction

  1. Pick up a pencil.
  2. Write your name.
  3. Close the notebook.

A computer also follows instructions—but it understands programming languages instead of English.


What Is AI?

Artificial Intelligence (AI) is technology that enables computers to perform tasks that normally require human intelligence.

Examples include:

  • Answering questions
  • Recognizing faces
  • Translating languages
  • Recommending videos
  • Writing stories
  • Solving math problems

Where Do You Use AI?

AppAI Feature
ChatGPTAnswers questions
YouTubeRecommends videos
Google MapsFinds the fastest route
NetflixSuggests movies
SpotifyRecommends songs
GrammarlyCorrects writing

Coding + AI

Think of AI as a very smart assistant.

Coding tells the assistant what to do.

Without coding, computers cannot understand our instructions.

What is Python?

Python is a computer language that helps us talk to computers. Just like people use English or Urdu to communicate with each other, programmers use Python to tell a computer what to do.

Python is one of the easiest programming languages to learn because it uses simple words and is easy to read. That’s why millions of students around the world start their coding journey with Python.


Why Should Kids Learn Python?

Python makes learning to code fun and exciting. With Python, you can:

  • 🎮 Create simple games
  • 🤖 Build AI projects and chatbots
  • 📱 Develop useful apps
  • 📊 Explore data and solve problems
  • 🌐 Learn the same language used by real programmers

Learning Python also helps you become a better problem solver, improves logical thinking, and encourages creativity.


Where is Python Used?

Python is used by many of the world’s leading technology companies, including Google, Microsoft, Netflix, Spotify, and NASA. It is also one of the main programming languages used to build Artificial Intelligence (AI), machine learning, and robots.

When you learn Python today, you are learning a skill that professionals use to create amazing technologies.

Your First Python Program

print(“Hello, World!”)

What Does It Mean?

print() tells Python to display text on the screen.


Output:

Hello, World!

Activity 1: Change the Message

Try changing the code:

print(“Welcome to LearnWithQazi!”)

Then try:

print(“I am learning AI.”)

Activity 2: Personal Greeting

Write a program that prints:

My name is Ali.
I want to learn Artificial Intelligence.

Real-Life Example

Imagine you ask ChatGPT:

“Write a poem about space.”

Behind the scenes:

  1. You type a prompt.
  2. AI processes your request.
  3. It generates a response.
  4. The computer displays it.

Everything happens because of programming.


Did You Know?

  • The first computer programmer was Ada Lovelace.
  • Python is one of the most popular programming languages for AI.
  • Many AI applications are built using Python because it is simple and powerful.


Challenge

Write a program that prints three lines:

Welcome to AI!
I love coding.
LearnWithQazi


Key Takeaways

  • Coding means giving instructions to a computer.
  • AI helps computers perform intelligent tasks.
  • Python is beginner-friendly and widely used in AI.
  • print() displays information on the screen.
  • Every AI application starts with code.