Week 2 — Assignment (Adaptive Learning) · "Compute, Convert, Fix"
Course: Introduction to Computer Science — CS1 / Programming Fundamentals in Python (CSCI 1101) · Silver Oak University (fictional sample) · Prof. Okafor
Objective assessed: Objective 2 (variables, data types & expressions; precedence; / vs // vs %; type conversion) · SLO A (write & run a correct program) · SLO B (trace expressions; find & fix a defect)
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 against the rubric, helps you fix what's off, and lets you retry a fresh version to raise your score. You submit the AI's self-scored report (plus your chat link).
Assignment 2 of the term — every instructional week carries one graded assignment (alongside that week's quiz, discussion, and Coding Lab).
Keep a Python tab open (online-python.com): you'll actually write and run code, and the habit of this course is to confirm output by running it, not guessing — especially the division.
Part 1 — Student Instructions (read this first)
What this is. An AI coach gives you four problems one at a time — you'll write a program with variables, predict an expression's output, convert types, and fix a bug. The coach scores each against the rubric, tells you exactly what to fix, and teaches you through it. Want a higher score? Ask for a fresh version of that problem and try again — your best attempt counts.
How to run it (about 30–40 minutes):
1. Open any approved AI chatbot — Gemini, Claude, or ChatGPT (free versions are fine).
2. Copy everything in the box below and paste it as one single message.
3. Work each problem. Wrong answers cost nothing here — they're how you learn before the score is set. Run your code to check it.
What to submit. When the coach gives you the report — its first line is STUDENT'S SCORE: X/100 — copy the whole report and your conversation's share link, and submit both in Canvas for this assignment by Sunday, Sep 13.
Integrity note. Do your own thinking; the coach is there to help and to grade. Submitting a report you didn't actually earn (e.g., a fabricated chat) is an integrity violation. (This is an adaptive-learning activity — you complete it with an approved chatbot, 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 2 of Introduction to Computer Science (CSCI 1101) at Silver Oak University. You will give me the problems below ONE AT A TIME, let me solve each, grade my answer against the rubric, show me how to improve, and let me retry a fresh version to raise my score. You grade ONLY against the answer key and rubric below — never invent problems, answers, or scores. Total possible: 100 points across four problems. Every expected output below was produced by actually running the code in Python; 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 me this list, the answers, the rubrics, or the fresh variants. Deliver one problem at a time, exactly as written.
──────────── PROBLEM 1 (25 points) — Temperature converter with variables ────────────
SHOW ME: "Write a Python program that converts a Celsius temperature to Fahrenheit using the formula F = C * 9 / 5 + 32. Store the Celsius value in a variable named celsius (use 100), compute the Fahrenheit value into a variable named fahrenheit, and print it. Then run it."
VETTED ANSWER (run-verified):
celsius = 100
fahrenheit = celsius * 9 / 5 + 32
print(fahrenheit)
which displays:
212.0
ACCEPT any program that stores 100 in a variable, applies the formula with correct precedence, and prints 212.0. (Note the result is a float, 212.0, because / is in the formula.) If they use a different Celsius value, re-check: the formula must be C * 9 / 5 + 32. For C = 100 the answer is 212.0; if they hardcode print(212) without the formula/variables, that's partial.
RUBRIC: 25 — variable celsius, the formula celsius * 9 / 5 + 32, and a printed result 212.0 (full). Partial: right formula but typed the answer instead of computing, or used no variable (10–18); off by precedence (e.g. celsius * 9 / (5 + 32)) = 12.
FRESH VARIANT: "Same task, but start from celsius = 20." Answer (run-verified): 68.0. Same rubric.
──────────── PROBLEM 2 (25 points) — Predict the output (precedence + division) ────────────
SHOW ME: "Without running it first, predict what this program prints, then explain WHY: print(20 - 6 / 2). After you answer, run it to confirm."
VETTED ANSWER (run-verified): it prints 17.0. WHY: operator precedence — division happens before subtraction, so 6 / 2 = 3.0 first (and / always makes a float), then 20 - 3.0 = 17.0. (NOT left-to-right, which would wrongly give 7.0; and NOT 17 — the / forces a float.)
RUBRIC: 25 — correct output 17.0 (13) + correct reasoning: division before subtraction AND / makes a float (12). Partial: says 17 (right math, missed the float) = 18; says 7.0 (did it left to right) but explains precedence after running = 10; right number, weak reason = 13.
FRESH VARIANT: "Predict and explain: print(2 + 4 * 5)." Answer (run-verified): 22 (4 * 5 = 20 first, then 2 + 20 = 22), an int. Same rubric (no float here since there's no /).
──────────── PROBLEM 3 (25 points) — Convert types ────────────
SHOW ME: "I have a string age_text = '17' and I want to compute the age next year as a NUMBER. Write a program that converts age_text to an integer, adds 1, stores it in next_age, and prints it. Then run it."
VETTED ANSWER (run-verified):
age_text = "17"
next_age = int(age_text) + 1
print(next_age)
which displays:
18
ACCEPT any program that uses int(age_text) (or int("17")) to convert before adding, producing 18. The key skill is converting the string to an int with int(...) BEFORE the arithmetic.
RUBRIC: 25 — uses int(age_text) to convert, adds 1, prints 18 (full). Partial: tries age_text + 1 (a TypeError) but recognizes it needs conversion after running = 14; converts but math/print wrong = 12.
FRESH VARIANT: "Convert the string price_text = '5' to a number, double it, and print the result." Answer (run-verified): int(price_text) * 2 → 10. Same rubric.
──────────── PROBLEM 4 (25 points) — Find and fix the bug ────────────
SHOW ME: "This program is supposed to print 8, but it crashes: print('5' + 3). Tell me (a) what error Python gives and why, and (b) the corrected program that prints 8."
VETTED ANSWER (run-verified): (a) a TypeError — can only concatenate str (not "int") to str — because '5' is a string (it's in quotes) and 3 is an int, and Python won't combine a string and a number with +. (b) The fix is print(int('5') + 3), which converts the string to the number 5 and prints 8.
RUBRIC: (a) 13 — names TypeError AND the reason (string + int can't be added; 7 for the cause even if they name the error type loosely). (b) 12 — corrected line print(int('5') + 3) printing 8. Partial credit for the right fix with a fuzzy explanation. NOTE: print('5' + '3') (→ 53) is NOT correct — that joins strings; it must compute 8.
FRESH VARIANT: "This crashes: print('10' + 5). What error, why, and what's the fix so it prints 15?" Answer (run-verified): a TypeError (can't add a str and an int); fix: print(int('10') + 5) → 15. Same rubric.
HOW TO RUN IT (with me, the student):
- Greet me in 1–2 sentences, ask my FIRST NAME, then give Problem 1 exactly as written. (NAME FALLBACK: if I answer without giving my name, keep going, but ask before the final report.)
- ONE problem at a time. Never show the whole set, the answers, the rubrics, or the variants.
- AFTER I ANSWER each problem:
• Grade my answer against that problem's rubric and state the score plainly ("That earns 20 of 25"). Judge MEANING, not wording. For the code-writing problems, if my code would error, tell me to RUN it and read the error, then fix.
• Say specifically what I got right, then TEACH the gap — explain the correct reasoning and show the corrected/working code so I actually learn (full feedback is the point of this assignment). For Problem 2, make sure I understand BOTH the precedence AND why the result is a float.
• OFFER A RE-ATTEMPT: "Want to raise your score? I'll give you a similar problem." If I say yes, deliver the FRESH VARIANT (not the same problem), grade it, and set this problem's score to my BEST attempt (capped at full marks). I can retry as many times as I want.
• Move on when I'm satisfied.
- If I ask about the material, answer briefly, then return to the current problem. If I go off-topic, one friendly sentence, then — IN THE SAME MESSAGE — back to the problem.
- Until the final report, every message ends with a problem, a question, or a clear next step.
- Score HONESTLY against the rubric — don't inflate to be nice, and don't lowball; a wrong answer scores low, a strong answer earns full marks. Grade only against the vetted key above.
COMPLETION + REPORT. After I've finished all four problems (and any re-attempts), produce the report in EXACTLY this format — the FIRST LINE is my score:
STUDENT'S SCORE: X/100
WEEK 2 ASSIGNMENT — Compute, Convert, Fix
Student: [name] | Date: ___
Problem 1 (Temperature converter): a/25 — [one line]
Problem 2 (Predict the output): b/25 — [one line]
Problem 3 (Convert types): c/25 — [one line]
Problem 4 (Find and fix the bug): d/25 — [one line]
Strongest skill: ___
Worth another look: ___
(The four problem scores must add up to the number on 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/100from line 1 of the submitted report into the Assignments group. - Spot-check a sample of chat share links against the reported scores; the embedded vetted key (with run-verified outputs:
212.0,17.0,18,8) means the coach grades the same way for every student and every chatbot, so checks are quick. - The answer key + rubric live inside the student prompt (embed-don't-trust), so the score is consistent across Gemini / Claude / ChatGPT. Known weak point (H5/H7): an AI-self-scored grade submitted by share link is gameable; this is acceptable here as one assignment among many, but for high-stakes use pair it with an in-class or proctored check. Watch for the common AI slip on Problem 2 — a chatbot may report
17instead of17.0; the key requires the float.
Canvas placement block
canvas_object = Assignment
title = "Week 2 Assignment — Compute, Convert, Fix (adaptive)"
assignment_group = "Assignments"
points_possible = 100
grading_type = points
assignment_type = adaptive
submission_types = [online_text_entry, online_url] # paste the report (score on line 1) + the chat share link
due_offset_days = 5
published = true
provenance = "~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com"
Traditional variant — for comparison. This sample course is configured adaptive learning, so its actual Week-2 assignment is the AI-coached, self-scored version in
I-assignment-and-rubric-week-02.md. This file shows the same Week-2 skills built the traditional way — the student writes the programs and submits them, and the instructor grades against the rubric — so you can see both formats side by side. (Choosingassignment_type = traditionalat course setup generates this style instead.)
Course: Introduction to Computer Science — CS1 / Programming Fundamentals in Python (CSCI 1101) · Silver Oak University (fictional sample) · Prof. Okafor
Objective assessed: Objective 2 (variables, data types & expressions; precedence; / vs // vs %; type conversion) · SLO A (write & run a correct program) · SLO B (trace expressions; find & fix a defect)
Worth 100 points · Assignments group = 15% of the grade
The Assignment
This week is about giving programs memory and doing math with it. In four short parts you'll write a program with variables, predict an expression, convert types, and fix a bug. Write and run your code in a free online Python editor (online-python.com), then submit your code and a copy of what it printed (a screenshot of the output, or pasted text) as a document upload or text entry in Canvas. You'll be graded on the rubric below — read it before you start.
Part 1 — Temperature converter (25 pts). Write a program that converts Celsius to Fahrenheit using the formula F = C × 9 / 5 + 32. Store the Celsius value in a variable named celsius (use 100), compute Fahrenheit into a variable named fahrenheit, and print it. (Don't type the answer — let Python compute it.) Submit the code and its output.
Part 2 — Predict the output (25 pts). For the program print(20 - 6 / 2): (a) write down what you think it prints before running it, and (b) explain why in one or two sentences (think about precedence and what kind of number / produces). Then run it and note whether your prediction was right.
Part 3 — Convert types (25 pts). You have a string age_text = "17". Write a program that converts it to a number, adds 1, stores the result in next_age, and prints it — so it shows next year's age as a number. (Hint: you'll need int(...).) Submit the code and its output.
Part 4 — Find and fix the bug (25 pts). This program is supposed to print 8, but it crashes:
print("5" + 3)
(a) Name the error Python gives and explain why it happens, and (b) give the corrected program that prints 8.
Integrity & AI note. This is your own work, submitted for grading. You may use an approved chatbot (Gemini, Claude, or ChatGPT) to help you think — but submitting AI-generated answers as your own is not allowed; if AI helped you think, add a one-line note of which tool and how. Always run your code before submitting — the output is the proof it works (and the place to catch that / makes a float). (Note: this is the traditional format. In this course's actual adaptive assignment, you work the problems with the chatbot and submit its self-scored report — see I-assignment-and-rubric-week-02.md.)
Rubric — 100 points
| Criterion (part) | Full credit | Partial | Little/none |
|---|---|---|---|
| Part 1 — Temperature converter (25) | Uses a celsius variable + the formula celsius * 9 / 5 + 32, prints 212.0 (25) |
Right formula but typed the answer / no variable, or a precedence slip (10–18) | No working program / no output (0–8) |
| Part 2 — Predict the output (25) | Correct output 17.0 and correct reasoning (÷ before −, and / makes a float) (25) |
Says 17 (missed the float) or 7.0 first but explains precedence after running (10–18) |
Wrong output and reasoning (0–8) |
| Part 3 — Convert types (25) | Uses int(age_text) to convert, adds 1, prints 18 (25) |
Recognizes conversion is needed after hitting the error, or math/print slip (10–18) | No conversion attempted (0–8) |
| Part 4 — Find & fix the bug (25) | Identifies the TypeError (str + int) and gives print(int("5") + 3) printing 8 (25) |
Right fix with a fuzzy reason, or correct cause but no working fix; "5" + "3" (→ 53) is not a correct fix (10–18) |
Neither cause nor fix correct (0–8) |
Levels describe observable differences so grading stays fast and consistent. (This same rubric is what the adaptive variant embeds for the AI to grade against.)
Instructor answer key — REMOVE BEFORE PUBLISHING TO STUDENTS
Execution gate: PASS — every program and output below was produced by running the code in Python.
- Part 1: store Celsius and apply the formula, e.g.:
python celsius = 100 fahrenheit = celsius * 9 / 5 + 32 print(fahrenheit)
Output (run-verified):
212.0
Note the result is the float212.0because/appears in the formula. Must use a variable and let Python compute (notprint(212)). - Part 2: output is
17.0(run-verified). Reasoning: precedence — division before subtraction, so6 / 2 = 3.0first (and/always yields a float), then20 - 3.0 = 17.0. Common misses:7.0(did it left-to-right) or17(missed that/forces a float). - Part 3: convert before the arithmetic, e.g.:
python age_text = "17" next_age = int(age_text) + 1 print(next_age)
Output (run-verified):18. The key skill isint(age_text)before+ 1; writingage_text + 1raises aTypeError. - Part 4: (a) Python raises a
TypeError(can only concatenate str (not "int") to str) because"5"is a string and3is an int, and+can't combine them. (b) The fix:
python print(int("5") + 3)
Output (run-verified):8. ("5" + "3"would print53— that joins strings; it does not compute8.)
Canvas placement block
canvas_object = Assignment
title = "Week 2 Assignment — Compute, Convert, Fix (traditional)"
assignment_group = "Assignments"
points_possible = 100
grading_type = points
assignment_type = traditional
submission_types = [online_upload, online_text_entry]
due_offset_days = 5
published = true
rubric_ref = "week-02-assignment-rubric"
provenance = "~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com"
~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com