# Activity 8

## Presentation

{% embed url="<https://docs.google.com/presentation/d/1x3ecO-Ahk6BotQvuLqWPsOpqRRE1onCSCis7yGIh_zY/edit?usp=sharing>" %}

## Presentation Video

{% embed url="<https://youtu.be/W8HODPTdHDA>" %}

## Starter Code - index.html

```markup
<!DOCTYPE html>
<html>
    <head>
        <title>Welcome to Activity 8</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    </head>
    <body>
        Welcome to Activity 8!
        <P>
        <h1>Friends Part A</h1>
        <li><a href="/friends/sam">Sam</a>
        <li><a href="/friends/alex">Alex</a>
        <li><a href="/friends/jordan">Jordan</a>
        <P>
        <h1>Part B</h1>
        <li><a href="/outline">Outline</a>
    </body>
</html>
```

## Starter Code - application.py

```python
from flask import Flask, render_template
app = Flask(__name__)

@app.route("/")
def index():
    return render_template('index.html')

@app.route("/friends")
@app.route("/friends/<name>")
def friends(name=None):
    return render_template('friends.html',name=name)
    
@app.route("/outline")
def outline():
    return render_template('outline.html')
```

## Starter Code - friends.html

```markup
<!DOCTYPE html>
<html>
    <head>
        <title>{{name}}</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    </head>
    <body>
        <h1>{{name}}</h1>
    </body>
</html>
```

## Starter Code - outline.html

```markup
<!DOCTYPE html>
<html>
  <head>
    <title>Outline of your story</title>
  </head>
  <body>
  <h1>Outline of your story</h2>
  Here we are going to use nested lists (lists within lists) to organize your story.
  <ul>
    <li>Start at your house</li>
    <li>Goto school
      <ul>
        <li>Enter Classroom 1</li>
        <li>Enter Classroom 2</li>
      </ul>
    <li>Stay virtual
      <ul>
        <li>Enter Virtual Classroom 1</li>
        <li>Enter Virtual Classroom 2</li>
      </ul>
    </li>
  </ul>

  </body>
</html>

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.advancedpython.net/day-8/activity-8.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
