❓ Beginner Questions Answered

Frequently Asked Questions

Quick answers to common coding questions – HTML, Python, and AI.

HTML What is the difference between <div> and <span>?

<div> is a block‑level element – it takes up the full width of its container. <span> is an inline element – it only takes up as much width as needed.

Example:

<div>This is a block</div>
<span>This is inline</span> <span>and this is next to it</span>

📚 Learn more in Lesson 1.6: Semantic HTML →

HTML How do I center a div?

There are several ways to center a div:

  • Margin auto: margin: 0 auto; (requires a set width).
  • Flexbox: display: flex; justify-content: center; align-items: center;
  • Grid: display: grid; place-items: center;

📚 Learn more in Lesson 1.9: Flexbox & Grid →

HTML What is the difference between <section> and <article>?

<section> groups related content – it's a thematic grouping. <article> is for self‑contained, independent content (like a blog post or news story).

📚 Learn more in Lesson 1.6: Semantic HTML →

HTML Is using <center> still okay?

<center> is deprecated – it no longer works in modern HTML. Use CSS instead: text-align: center; or Flexbox.

📚 Learn more in Lesson 1.7: CSS Basics →

Python What is the difference between a list and a tuple?
  • List – mutable (can be changed). Created with [ ].
  • Tuple – immutable (cannot be changed). Created with ( ).

Example:

fruits = ["apple", "banana"]  # list – can add/remove
colors = ("red", "green")     # tuple – cannot change

📚 Learn more in Lesson 1.3: Lists & Tuples →

Python What is the difference between '==' and 'is'?
  • == – checks if values are equal.
  • is – checks if they refer to the same object in memory.

Example:

a = [1, 2, 3]
b = [1, 2, 3]
print(a == b)  # True
print(a is b)  # False
Python How do I read a CSV file?

Use the built‑in csv module:

import csv

with open("file.csv", "r") as f:
    reader = csv.reader(f)
    for row in reader:
        print(row)

📚 Learn more in Lesson 2.2: Modules & Packages →

Python What is the difference between 'append()' and 'extend()'?
  • append() – adds one item to the end of the list.
  • extend() – adds multiple items from an iterable.

Example:

nums = [1, 2, 3]
nums.append(4)        # [1, 2, 3, 4]
nums.extend([5, 6])   # [1, 2, 3, 4, 5, 6]

📚 Learn more in Lesson 1.3: Lists & Tuples →

AI What is the difference between AI, ML, and DL?
  • AI – the broad field of creating intelligent machines.
  • ML – a subset of AI where machines learn from data.
  • DL – a subset of ML using neural networks with many layers.

📚 Learn more in Lesson 1.1: What is AI? →

AI What is gradient descent?

Gradient descent is an optimisation algorithm used to minimise the loss function in machine learning. It works by iteratively adjusting the model's parameters to reduce error.

📚 Learn more in Lesson 1.3: Neural Networks →

AI What is a Large Language Model (LLM)?

An LLM is a type of AI trained on vast amounts of text to understand and generate human‑like language. Examples include GPT, Gemini, and Claude.

📚 Learn more in Lesson 1.8: LLMs & Prompt Engineering →

AI What should I learn first: AI or ML?

Start with AI concepts (what it is, applications), then dive into ML (supervised, unsupervised, reinforcement), and finally deep learning (neural networks).

📚 Start the free AI course →

❓ Have a question?

Can't find what you're looking for? Suggest a question and I'll add it here.

📬 Suggest a Question
← Back to Home