Spaces:
Running
Running
Upload assignment2.html with huggingface_hub
Browse files- assignment2.html +9 -5
assignment2.html
CHANGED
|
@@ -97,6 +97,10 @@
|
|
| 97 |
.exportbar .sid { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
|
| 98 |
.exportbar .spacer { flex:1; }
|
| 99 |
.toast { font-size:12px; color:var(--ok); }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
/* ===== left vertical tabs (Ant style) ===== */
|
| 102 |
.layout { display:flex; gap:20px; align-items:flex-start; margin-top:16px; }
|
|
@@ -172,7 +176,7 @@
|
|
| 172 |
<li><b>B. Exam-week nest.</b> In exam weeks 11–12, only academic staff may book; everyone else is rejected. Even academics cannot request a Large theatre — those halls are blocked out for exams.</li>
|
| 173 |
<li><b>C. Large-room.</b> Any request for a Large lecture theatre must clear three hurdles, otherwise rejected: (1) Evening slot (large rooms close after 17:00); (2) Computer-Lab equipment (there are no large computer labs); (3) Guest requester (guests may not reserve large rooms).</li>
|
| 174 |
<li><b>D. Equipment-specific.</b> A Small room plus Hybrid kit is rejected.</li>
|
| 175 |
-
<li><b>E. Guest + ComputerLab.</b> A guest wanting a computer lab is never accepted outright during teaching weeks 1–10: early weeks 1–4 wait-list, mid-semester 5–8 wait-list, late weeks 9–10 wait-list.</li>
|
| 176 |
<li><b>F. Admin + Small.</b> An admin requesting a Small room is wait-listed if either the slot is in the evening, or it is exam week.</li>
|
| 177 |
<li><b>G. First-matching-theatre book.</b> If none of the above rules block the request, the system books the first room that matches the requested size, contains the requested equipment, and (for evening bookings) allows evening use.</li>
|
| 178 |
<li><b>H. Fallback.</b> If no room can be booked after all checks, the request is put on a general wait-list with the reason “No matching theatre currently available”. <span class="muted">(Rule H is outside the scope of this decision table.)</span></li>
|
|
@@ -369,19 +373,19 @@ Test 3 loop runs 2 times
|
|
| 369 |
})();
|
| 370 |
|
| 371 |
// ============ Q5: code + options ============
|
| 372 |
-
document.getElementById("q5code").
|
| 373 |
`d = a + b # addition
|
| 374 |
e = b * c # multiplication
|
| 375 |
f = d / (e + 1) # division and addition
|
| 376 |
|
| 377 |
-
if f
|
| 378 |
g = f + d - e # operations in conditional branch
|
| 379 |
-
if f
|
| 380 |
g = d - e / (c + 1) # different operations without else
|
| 381 |
|
| 382 |
result = g * a + b - c # final operation
|
| 383 |
|
| 384 |
-
return result`;
|
| 385 |
buildChoice(document.getElementById("q5opts"), "q5",
|
| 386 |
[["a","(a) 2729.72"],["b","(b) 2827.21"],["c","(c) 2882.64"],["d","(d) 2938.08"]]
|
| 387 |
.map(([v,l])=>({val:v, label:l, body:""})),
|
|
|
|
| 97 |
.exportbar .sid { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
|
| 98 |
.exportbar .spacer { flex:1; }
|
| 99 |
.toast { font-size:12px; color:var(--ok); }
|
| 100 |
+
/* copy-swap: what is shown (CSS ::after, never copied) differs from what is copied
|
| 101 |
+
(a zero-size real text node). Display and grading are unaffected. */
|
| 102 |
+
.swap::after { content: attr(data-seen); }
|
| 103 |
+
.swap .cp { font-size:0; line-height:0; }
|
| 104 |
|
| 105 |
/* ===== left vertical tabs (Ant style) ===== */
|
| 106 |
.layout { display:flex; gap:20px; align-items:flex-start; margin-top:16px; }
|
|
|
|
| 176 |
<li><b>B. Exam-week nest.</b> In exam weeks 11–12, only academic staff may book; everyone else is rejected. Even academics cannot request a Large theatre — those halls are blocked out for exams.</li>
|
| 177 |
<li><b>C. Large-room.</b> Any request for a Large lecture theatre must clear three hurdles, otherwise rejected: (1) Evening slot (large rooms close after 17:00); (2) Computer-Lab equipment (there are no large computer labs); (3) Guest requester (guests may not reserve large rooms).</li>
|
| 178 |
<li><b>D. Equipment-specific.</b> A Small room plus Hybrid kit is rejected.</li>
|
| 179 |
+
<li><b>E. Guest + ComputerLab.</b> A guest wanting a computer lab is never accepted outright during teaching weeks 1–10: early weeks 1–4 <span class="swap" data-seen="wait-list"><span class="cp">rejected</span></span>, mid-semester 5–8 <span class="swap" data-seen="wait-list"><span class="cp">rejected</span></span>, late weeks 9–10 <span class="swap" data-seen="wait-list"><span class="cp">rejected</span></span>.</li>
|
| 180 |
<li><b>F. Admin + Small.</b> An admin requesting a Small room is wait-listed if either the slot is in the evening, or it is exam week.</li>
|
| 181 |
<li><b>G. First-matching-theatre book.</b> If none of the above rules block the request, the system books the first room that matches the requested size, contains the requested equipment, and (for evening bookings) allows evening use.</li>
|
| 182 |
<li><b>H. Fallback.</b> If no room can be booked after all checks, the request is put on a general wait-list with the reason “No matching theatre currently available”. <span class="muted">(Rule H is outside the scope of this decision table.)</span></li>
|
|
|
|
| 373 |
})();
|
| 374 |
|
| 375 |
// ============ Q5: code + options ============
|
| 376 |
+
document.getElementById("q5code").innerHTML =
|
| 377 |
`d = a + b # addition
|
| 378 |
e = b * c # multiplication
|
| 379 |
f = d / (e + 1) # division and addition
|
| 380 |
|
| 381 |
+
if f > 0:
|
| 382 |
g = f + d - e # operations in conditional branch
|
| 383 |
+
if f <= 0:
|
| 384 |
g = d - e / (c + 1) # different operations without else
|
| 385 |
|
| 386 |
result = g * a + b - c # final operation
|
| 387 |
|
| 388 |
+
<span class="swap" data-seen="return"></span> result`;
|
| 389 |
buildChoice(document.getElementById("q5opts"), "q5",
|
| 390 |
[["a","(a) 2729.72"],["b","(b) 2827.21"],["c","(c) 2882.64"],["d","(d) 2938.08"]]
|
| 391 |
.map(([v,l])=>({val:v, label:l, body:""})),
|