Complete the code to find the minimum of two numbers.
output "min_value" { value = min(10, [1]) }
The min function returns the smallest number. Here, 5 is smaller than 10.
Complete the code to find the maximum of three numbers.
output "max_value" { value = max(7, 14, [1]) }
The max function returns the largest number. Among 7, 14, and 20, 20 is the largest.
Fix the error in the code to correctly round up the number.
output "rounded_up" { value = ceil([1]) }
The ceil function rounds a number up. It requires a numeric input, not a string or function name.
Fill both blanks to create a value that is the maximum of 5 and the ceiling of 4.3.
output "max_ceil" { value = max([1], ceil([2])) }
The code finds the maximum between 5 and the ceiling of 4.3 (which is 5). So both blanks must be 5 and 4.3 respectively.
Fill all three blanks to output the minimum of the ceiling of 7.1, the maximum of 3 and 9, and 8.
output "complex_calc" { value = min(ceil([1]), max([2], [3]), 8) }
The ceiling of 7.1 is 8. The maximum of 3 and 9 is 9. The minimum among 8, 9, and 8 is 8.