{"id": "fresh2/s1", "task": "visual", "cat": "svg", "kind": "svg", "animated": false, "prompt": "Draw a cartoon hedgehog walking on grass: a brown spiky back made of many small triangles, a light brown face with a black nose and a black eye, small feet, and green grass along the bottom.\n\nDo not write the SVG by hand. Write a Python 3 program that draws it with the svgkit toolkit and prints it:\n from svgkit import *\n s = SVG(width, height, bg='#ffffff') # viewBox 0 0 width height; y grows downwards\nShapes (extra keyword arguments become SVG attributes, e.g. stroke='#333', stroke_width=3, opacity=0.8):\n s.rect(x, y, w, h, fill, rx=None), s.circle(cx, cy, r, fill), s.ellipse(cx, cy, rx, ry, fill, rotate=0),\n s.line(x1, y1, x2, y2, stroke, width), s.polyline(points, stroke, width), s.polygon(points, fill), s.path(d, fill),\n s.text(x, y, 'label', size=16, fill='#222', anchor='middle' | 'start' | 'end', weight='bold')\nGeometry (angles in degrees clockwise from 12 o'clock: 0 = up, 90 = right, 180 = down, 270 = left):\n polar(cx, cy, r, deg) -> (x, y); s.regular_polygon(cx, cy, r, n, rotate=0, fill=...);\n s.star(cx, cy, r_out, r_in, n=5, fill=...); s.slice(cx, cy, r, start_deg, end_deg, r_inner=0, fill=...)\n (pie slice, donut segment when r_inner > 0); s.arc(cx, cy, r, start_deg, end_deg, stroke, width) (open arc: gauges,\n rings, angle marks); s.radial_lines(cx, cy, r1, r2, n, start=0, stroke, width) (n evenly spaced ticks, rays,\n spokes); s.radial_text(cx, cy, r, ['A', 'B', 'C', 'D'], start=0, size=...) (labels evenly around a circle);\n s.smooth(points, closed=False, fill, stroke) (smooth curve through points); s.wave(x0, x1, y, amplitude,\n wavelength, bottom=None, fill) (bottom=y closes it into a filled band); s.arrow(x1, y1, x2, y2, stroke, width,\n head=10); s.connector(x1, y1, x2, y2) (arrow with right-angle bends).\nPaint: fill=s.linear_gradient([(0, '#87ceeb'), (1, '#ffffff')]) (top to bottom; x2=1, y2=0 for left to right),\n s.radial_gradient([...]), filter=s.shadow(), filter=s.glow(8).\nStructure: with s.group(translate=(x, y), rotate=(deg, cx, cy), scale=k): ...; with s.mirror(x): ... (everything\n drawn inside appears again mirrored around the vertical line x); with s.repeat_around(cx, cy, n): ... (what you draw\n pointing up from the centre is repeated n times around it). Later shapes are drawn on top of earlier ones.\nCharts: y = Scale((min_value, max_value), (bottom_px, top_px)); y(v) -> pixel; s.axis_y(y, x, values, x_end=...)\n (tick labels and grid lines), s.axis_x(y_px, x0, x1, labels, positions), s.legend(x, y, [(colour, label), ...]);\n mix(c1, c2, t) blends two colours.\n\nExample (a flower):\nfrom svgkit import *\ns = SVG(400, 400, bg='#eef6ee')\ns.line(200, 210, 200, 380, stroke='#3f7d3a', width=8)\nwith s.repeat_around(200, 170, 8):\n s.ellipse(200, 110, 26, 55, fill='#f472b6')\ns.circle(200, 170, 34, fill='#fbbf24')\nprint(s)\n\nAnswer with the program in a single ```python code block. It must print the finished SVG."} {"id": "fresh2/s2", "task": "visual", "cat": "svg", "kind": "svg", "animated": false, "prompt": "Draw a weather card: a rounded white card with the city 'Oslo', the temperature '18 °C' in large text, an icon of a sun partly behind a cloud, and three small labelled bars for wind, rain and humidity.\n\nDo not write the SVG by hand. Write a Python 3 program that draws it with the svgkit toolkit and prints it:\n from svgkit import *\n s = SVG(width, height, bg='#ffffff') # viewBox 0 0 width height; y grows downwards\nShapes (extra keyword arguments become SVG attributes, e.g. stroke='#333', stroke_width=3, opacity=0.8):\n s.rect(x, y, w, h, fill, rx=None), s.circle(cx, cy, r, fill), s.ellipse(cx, cy, rx, ry, fill, rotate=0),\n s.line(x1, y1, x2, y2, stroke, width), s.polyline(points, stroke, width), s.polygon(points, fill), s.path(d, fill),\n s.text(x, y, 'label', size=16, fill='#222', anchor='middle' | 'start' | 'end', weight='bold')\nGeometry (angles in degrees clockwise from 12 o'clock: 0 = up, 90 = right, 180 = down, 270 = left):\n polar(cx, cy, r, deg) -> (x, y); s.regular_polygon(cx, cy, r, n, rotate=0, fill=...);\n s.star(cx, cy, r_out, r_in, n=5, fill=...); s.slice(cx, cy, r, start_deg, end_deg, r_inner=0, fill=...)\n (pie slice, donut segment when r_inner > 0); s.arc(cx, cy, r, start_deg, end_deg, stroke, width) (open arc: gauges,\n rings, angle marks); s.radial_lines(cx, cy, r1, r2, n, start=0, stroke, width) (n evenly spaced ticks, rays,\n spokes); s.radial_text(cx, cy, r, ['A', 'B', 'C', 'D'], start=0, size=...) (labels evenly around a circle);\n s.smooth(points, closed=False, fill, stroke) (smooth curve through points); s.wave(x0, x1, y, amplitude,\n wavelength, bottom=None, fill) (bottom=y closes it into a filled band); s.arrow(x1, y1, x2, y2, stroke, width,\n head=10); s.connector(x1, y1, x2, y2) (arrow with right-angle bends).\nPaint: fill=s.linear_gradient([(0, '#87ceeb'), (1, '#ffffff')]) (top to bottom; x2=1, y2=0 for left to right),\n s.radial_gradient([...]), filter=s.shadow(), filter=s.glow(8).\nStructure: with s.group(translate=(x, y), rotate=(deg, cx, cy), scale=k): ...; with s.mirror(x): ... (everything\n drawn inside appears again mirrored around the vertical line x); with s.repeat_around(cx, cy, n): ... (what you draw\n pointing up from the centre is repeated n times around it). Later shapes are drawn on top of earlier ones.\nCharts: y = Scale((min_value, max_value), (bottom_px, top_px)); y(v) -> pixel; s.axis_y(y, x, values, x_end=...)\n (tick labels and grid lines), s.axis_x(y_px, x0, x1, labels, positions), s.legend(x, y, [(colour, label), ...]);\n mix(c1, c2, t) blends two colours.\n\nExample (a flower):\nfrom svgkit import *\ns = SVG(400, 400, bg='#eef6ee')\ns.line(200, 210, 200, 380, stroke='#3f7d3a', width=8)\nwith s.repeat_around(200, 170, 8):\n s.ellipse(200, 110, 26, 55, fill='#f472b6')\ns.circle(200, 170, 34, fill='#fbbf24')\nprint(s)\n\nAnswer with the program in a single ```python code block. It must print the finished SVG."} {"id": "fresh2/p1", "task": "visual", "cat": "html", "kind": "html", "animated": false, "prompt": "Build a 'Book a table' page for a restaurant called 'Olive & Thyme': a heading, a short welcome text, a reservation form (date, time, number of guests, name, phone, book button) and a side box with opening hours and the address.\n\nUse the ui.css design system: put in
and at the end of (the system inlines both). Write semantic HTML with its classes and add your own