Labeled point with precision 1
Input
format_point(1.234, 4.567, label='A', precision=1)
Output
A: (1.2, 4.6)
label is provided and precision=1 rounds coordinates to one decimal place.
Full lesson preview
Practice defining keyword-only parameters using '*' and using them for clearer function calls.
Problem statement
Task
Examples
Input
format_point(1.234, 4.567, label='A', precision=1)
Output
A: (1.2, 4.6)
label is provided and precision=1 rounds coordinates to one decimal place.
Input format
Output format
Constraints
Samples
Input
format_point(1.234, 4.567)
Output
(1.23, 4.57)
Default precision is 2 and no label is provided.