العربية

Module 1: Introduction to AI

Course: Programming with Free AI Tools — Build Real Websites and Apps | Audience: Ages 15–25, beginners | Module Goal: Understand what AI is, how it helps in software development, and clear up common myths about AI coding.

Teaching Principle: Always verify AI output. AI is a helpful assistant, not a replacement for understanding your code.

Table of Contents

Lesson 1.1 — What Is Artificial Intelligence?

Duration: 45 minutes

Learning Objectives

Instructor Notes

Keep it friendly and relatable. Avoid heavy theory. Use examples students know: phone autocorrect, TikTok feed, Google Maps. Emphasize that AI is software trained on data, not magic. Remind them that AI makes mistakes and needs human checking.

Presentation Outline

  1. Welcome and course intro (5 min).
  2. Quick poll: "Where have you seen AI today?" (5 min).
  3. Simple definition of AI (10 min).
  4. Examples students use daily (10 min).
  5. AI vs program vs robot (10 min).
  6. What is machine learning in 1 slide (5 min).

Demonstration

  1. Open your phone and show autocorrect or a recommendation feed.
  2. Open a browser and type a sentence into Google; show "Did you mean".
  3. Explain each as a trained model predicting the next best option.
  4. Ask: "Is this AI or just a rule?" Discuss the difference.

AI Prompts

Starter Code

No code in this lesson. Write your answers in a notebook:
1. My definition of AI: ___________________________
2. Three AI tools I use daily:
   a) ___________________________
   b) ___________________________
   c) ___________________________

Final Code

Completed notes example:
1. My definition of AI: A computer program that learns patterns from data to make predictions or decisions.
2. Three AI tools I use daily:
   a) YouTube recommendations
   b) Phone autocorrect
   c) Spotify music suggestions

Exercises

Homework

Quiz

  1. What is the simplest definition of AI?
    • a) A physical robot
    • b) Software that learns patterns from data to make decisions ✅
    • c) A programming language
    • d) A type of computer
  2. Which of these is an example of AI you likely use daily?
    • a) A printed book
    • b) Video recommendation feeds ✅
    • c) A wooden ruler
    • d) A light switch
  3. What is machine learning?
    • a) A machine that never breaks
    • b) Teaching a computer using rules only
    • c) Training software on data so it improves at a task ✅
    • d) A type of hardware
  4. Is a calculator an AI?
    • a) Yes, always
    • b) No, it follows fixed rules without learning ✅
    • c) Only if it is expensive
    • d) Only on smartphones
  5. Why should we verify AI output?
    • a) AI is always wrong
    • b) AI can make confident mistakes and needs human checking ✅
    • c) It is illegal not to
    • d) It slows the computer

Lesson 1.2 — How AI Is Used in Software Development

Duration: 50 minutes

Learning Objectives

Instructor Notes

Show that AI is like a smart teammate: it writes boilerplate, explains code, finds errors, and suggests improvements. Stress that the developer must read, test, and understand the result. Use a live example if possible.

Presentation Outline

  1. Recap: what is AI (5 min).
  2. The developer's daily work (5 min).
  3. AI for code generation (10 min).
  4. AI for debugging and explanations (10 min).
  5. AI for documentation and testing (10 min).
  6. Limits and responsibilities (10 min).

Demonstration

  1. Open ChatGPT (or similar free tool).
  2. Type: "Write a Python function that adds two numbers."
  3. Show the response and read it line by line with students.
  4. Type: "Explain this code step by step." Show the explanation.
  5. Type: "Find the bug in this code: `print('Hello'`" and show the fix.
  6. Emphasize: we tested the output before trusting it.

AI Prompts

Starter Code

# Starter: complete this function
def multiply(a, b):
    # TODO: return the product of a and b
    pass

Final Code

# Final: working solution
def multiply(a, b):
    return a * b
print(multiply(3, 4))  # Output: 12

Exercises

Homework

Quiz

  1. Which is NOT a common use of AI in software development?
    • a) Generating code
    • b) Explaining code
    • c) Watering plants ✅
    • d) Finding bugs
  2. What does "code generation" mean?
    • a) Printing code on paper
    • b) AI writing code from a description ✅
    • c) Deleting code
    • d) Compiling code
  3. When AI gives you code, you should:
    • a) Copy it without reading
    • b) Read, test, and understand it ✅
    • c) Ignore it
    • d) Submit it as your own without checking
  4. AI is best described as a developer's:
    • a) Replacement
    • b) Smart teammate that needs supervision ✅
    • c) Enemy
    • d) Type of keyboard
  5. Which task can AI help with?
    • a) Writing documentation
    • b) Suggesting tests
    • c) Explaining errors
    • d) All of the above ✅

Lesson 1.3 — Misconceptions About AI Coding

Duration: 45 minutes

Learning Objectives

Instructor Notes

This lesson protects students from over-trusting AI. Use humor: "AI won't magically make you a billionaire coder overnight." Be honest that AI hallucinates (makes things up). Encourage curiosity plus skepticism.

Presentation Outline

  1. Myth 1: "AI can code anything perfectly" (10 min).
  2. Myth 2: "You don't need to learn to code" (10 min).
  3. Myth 3: "AI understands my project perfectly" (10 min).
  4. Real stories of AI mistakes (10 min).
  5. Healthy mindset: verify, learn, improve (5 min).

Demonstration

  1. Ask AI: "Build me a complete e-commerce site with payments." Show that the answer is generic and incomplete.
  2. Show an example where AI invents a fake function name or library.
  3. Demonstrate verifying by running the code and reading the error.
  4. Discuss: what would a real developer do next?

AI Prompts

Starter Code

Fill in the myth vs truth table:
Myth: "AI writes perfect code."
Truth: ___________________________________
Myth: "I don't need to learn coding."
Truth: ___________________________________

Final Code

Completed table:
Myth: "AI writes perfect code."
Truth: AI often makes errors and invents things; always test.
Myth: "I don't need to learn coding."
Truth: You must understand code to verify, fix, and secure it.

Exercises

Homework

Quiz

  1. Which is a common myth?
    • a) AI helps write code
    • b) AI can code anything perfectly without errors ✅
    • c) AI can explain code
    • d) AI can find bugs
  2. Why should you still learn coding fundamentals?
    • a) They are required by law
    • b) You need them to verify and fix AI output ✅
    • c) They are fun only
    • d) AI refuses otherwise
  3. What does "AI hallucination" mean?
    • a) A dream
    • b) AI confidently making up false info or fake code ✅
    • c) A visual effect
    • d) A type of bug in hardware
  4. Can AI build a complete real app from one prompt?
    • a) Yes, always
    • b) No, it needs iteration, testing, and human guidance ✅
    • c) Only on weekends
    • d) Only for games
  5. The healthiest attitude toward AI is:
    • a) Trust it blindly
    • b) Ignore it completely
    • c) Verify, learn, and improve with it ✅
    • d) Fear it