AI coding workspace
Six-dot Braille cells
A dot pattern is data before it becomes a character. Dotbraid helps you work on small encoding functions in a Windows project while keeping accepted positions and rejected inputs visible.
● ● ●Dotbraid●
A concrete starting point · Six-dot Braille cells ×
def braille_cell(dots):
if any(type(d) is not int or d < 1 or d > 6 for d in dots):
raise ValueError("dot range")
if len(set(dots)) != len(dots):
raise ValueError("duplicate dot")
return chr(0x2800 + sum(1 << (d - 1) for d in dots))✳Encode six-dot Braille cells from numbered dot positions.
✓ ChangesReview before applying ↗
Illustrative workspace
- Project
- Check the empty cell and all six dots, rejecting duplicate positions, dot seven and non-integer input.
- Review before applying
- Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
- Connection
- Base URL, credentials and a reachable server.
A concrete starting point
def braille_cell(dots):
if any(type(d) is not int or d < 1 or d > 6 for d in dots):
raise ValueError("dot range")
if len(set(dots)) != len(dots):
raise ValueError("duplicate dot")
return chr(0x2800 + sum(1 << (d - 1) for d in dots))