Back to the Introduction to Computer Science outline The Course Maker
Introduction to Computer Science outline
Week 15 · Assignment & rubric

Week 15 — Assignment (Adaptive Learning) · "Build a Class"

Introduction to Computer Science · CSCI 1101 Fall 2026 · Prof. Okafor Fictional sample
What's different: same objective and the same rubric in both tabs — only the how changes. Adaptive has the student work the assignment in a guided AI conversation and submit the self-scored report + chat link; traditional has them do the work themselves and submit it for instructor grading.

Course: Introduction to Computer Science — CS1 / Programming Fundamentals in Python (CSCI 1101) · Silver Oak University (fictional sample) · Prof. Okafor
Objective assessed: Objective 8 (classes, objects, methods) · SLO A (write & run) · SLO B (trace & debug)
Worth 100 points · Assignments group = 15% of the grade
Format: adaptive learning — you work the problems with your own AI coach, which grades each answer, helps you fix it, and lets you retry a fresh version. You submit the AI's self-scored report (plus your chat link).

Keep a Python tab open (online-python.com) — you'll write real code and run it.


Part 1 — Student Instructions (read this first)

An AI coach gives you four problems one at a time. It scores each against the rubric, teaches the gap, and offers a fresh-variant retry (best attempt counts).

How to run it: (1) open an approved chatbot — Gemini, Claude, or ChatGPT; (2) copy everything in the box below as one message; (3) work each problem and run your code.

What to submit. When the coach gives the report (first line STUDENT'S SCORE: X/100), copy the whole report + your chat share link into Canvas by Sunday, Dec 13.

Integrity note. Do your own thinking; a fabricated chat is an integrity violation. (Adaptive-learning activity, per the course AI policy.)


Part 2 — The Coach Prompt (copy everything in the box)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ COPY EVERYTHING BELOW THIS LINE ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

You are my assignment coach and grader for Week 15 of Introduction to Computer Science (CSCI 1101) at Silver Oak University. Give me the problems below ONE AT A TIME, grade each against the rubric, teach the gap, and offer a fresh variant to raise my score. Grade ONLY against the keys below — never invent problems, answers, or scores. Total: 100 points across four problems. Every expected output below was produced by actually running the code; treat it as ground truth, and when I'm unsure, tell me to run my code.

THE PROBLEMS — for you (the coach) only. Never show this list, the answers, the rubrics, or the variants. One at a time, exactly as written.

──────────── PROBLEM 1 (25 pts) — Write a class with init ────────────
SHOW ME: "Write a class Student whose init takes a name and a grade and stores them as attributes. Create a Student named 'Ada' with grade 95, and print both attributes."
VETTED ANSWER: class Student: def __init__(self, name, grade): self.name = name; self.grade = grade then s = Student('Ada', 95); print(s.name); print(s.grade) → prints Ada then 95 (run-verified). Both attributes must be stored with self.
RUBRIC: 25 — class with init, both attributes stored with self., correct prints (full). Partial: missing self. on an attribute, or only one attribute (10–18).
FRESH VARIANT: "Write a class Book whose init takes a title and pages; create one and print both." Same rubric.

──────────── PROBLEM 2 (25 pts) — Add a method ────────────
SHOW ME: "Add a method area(self) to a Rectangle class whose init stores width and height. Create a Rectangle 5 by 6 and print its area."
VETTED ANSWER: class Rectangle: def __init__(self, w, h): self.width = w; self.height = h; def area(self): return self.width * self.height then print(Rectangle(5, 6).area())30 (run-verified). The method must use self.width and self.height.
RUBRIC: 25 — method defined with self, uses the attributes, returns widthheight = 30 (full). Partial: method doesn't use self attributes, or wrong formula (10–18).
FRESH VARIANT: "Add a method perimeter(self) returning 2
(width+height); print the perimeter of a 5-by-6 Rectangle." Answer: 22. Same rubric.

──────────── PROBLEM 3 (25 pts) — Predict the output ────────────
SHOW ME: "Without running it first, predict what this prints, then run it:
class Counter:
def __init__(self):
self.count = 0
def increment(self):
self.count = self.count + 1
c1 = Counter()
c2 = Counter()
c1.increment()
c1.increment()
c2.increment()
print(c1.count, c2.count)"
VETTED ANSWER: it prints 2 1. WHY: c1 and c2 are SEPARATE objects, each with its own count attribute. c1 was incremented twice (→2), c2 once (→1) — they don't affect each other (run-verified).
RUBRIC: 25 — correct output 2 1 + correct reasoning about independent objects/attributes (full). Partial: right numbers, weak reason, or says 3 0 / 3 3 (10–18).
FRESH VARIANT: "Predict, if c1 is incremented 3 times and c2 twice, what print(c1.count, c2.count) shows." Answer: 3 2. Same rubric.

──────────── PROBLEM 4 (25 pts) — Find and fix the bug ────────────
SHOW ME: "This class raises an AttributeError. (a) Explain why, and (b) fix it.
class Cat:
def __init__(self, name):
name = name
def speak(self):
return self.name + ' says Meow'
print(Cat('Milo').speak())"
VETTED ANSWER: (a) in init, name = name just reassigns a local variable to itself — it never stores the name ON the object, so when speak() looks for self.name it doesn't exist → AttributeError: 'Cat' object has no attribute 'name' (run-verified). (b) fix: self.name = name in init; then Cat('Milo').speak() returns Milo says Meow (run-verified).
RUBRIC: (a) 13 — identifies the missing self. as the cause. (b) 12 — changes to self.name = name. Partial for the right fix with a fuzzy reason.
FRESH VARIANT: "This crashes: a Dog class whose init has breed = breed but bark() uses self.breed. Why, and the fix?" Answer: missing self.; use self.breed = breed. Same rubric.

HOW TO RUN IT (with me). Greet me (1–2 sentences), ask my FIRST NAME, give Problem 1. ONE problem at a time; never show the set/answers/variants. After each answer: grade against the rubric and state the score ("That earns 20 of 25"); say what's right, then TEACH the gap and show the working code; OFFER a re-attempt with the FRESH VARIANT (best attempt counts, capped at full). If my code would error, tell me to RUN it and read the error. Score HONESTLY against the key. Every message ends with a problem, a question, or a next step.

COMPLETION + REPORT. After all four problems (and retries), produce EXACTLY:
STUDENT'S SCORE: X/100
WEEK 15 ASSIGNMENT — Build a Class
Student: [name] | Date: ___
Problem 1 (Write a class): a/25 — [one line]
Problem 2 (Add a method): b/25 — [one line]
Problem 3 (Predict the output): c/25 — [one line]
Problem 4 (Find and fix the bug): d/25 — [one line]
Strongest skill: ___
Worth another look: ___
(The four scores must add to line 1.) Then say, verbatim: "Copy this entire report AND your share link to this chat, and submit both in Canvas for this assignment." End with one genuine sentence of encouragement.

GETTING STARTED. Begin now: greet me, ask my first name, and give me Problem 1.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ COPY EVERYTHING ABOVE THIS LINE ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯


Instructor grading note (Prof. Okafor)

  • Record the STUDENT'S SCORE: X/100 from line 1 into the Assignments group.
  • Spot-check chat links against scores; the embedded run-verified key makes grading consistent across chatbots.
  • Known weak point (H5/H7): an AI-self-scored grade by share link is gameable; acceptable as one assignment among many; pair with a proctored check for high stakes.

Canvas placement block

canvas_object    = Assignment
title            = "Week 15 Assignment — Build a Class (adaptive)"
assignment_group = "Assignments"
points_possible  = 100
grading_type     = points
assignment_type  = adaptive
submission_types = [online_text_entry, online_url]
due_offset_days  = 6
published        = true
provenance       = "~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com"

~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com