Use `st.checkbox` when someone should be able to turn an option on or off. It renders a labeled box and returns a Boolean value, so an `if` statement can show an extra input or choose different behavior. section 3.7.1
Offer rounding only when requested
A unit converter need not show a decimal-places input to everyone. Set `places = None`, then put `st.number_input` inside `if st.checkbox("Round result?", value=False):`. The unchecked box leaves the result at full precision; checking it reveals the input. Initializing `places` first lets later formatting code use it either way. section 3.7.1
A task list needs one checkbox per task. Loop over the tasks and pass each task’s name as the label and its `is_done` Boolean as the initial checked value. Give each checkbox a distinct `key` when building the repeated widgets. Rendering them is only the first step: checking a box must also update the task’s status. section 4.2.1 section 4.5.5
For completed tasks, the label can use Markdown strikethrough: `~~task name~~`. Branch on the checkbox result to call `mark_done` or `mark_not_done`. Test the visible result as well as the status: task-list changes can appear one action late, and calling `st.rerun()` in both branches makes the app rerun without stopping. section 4.5.5



