Description
I guess everyone knows the fairy tale of Rapunzel and the prince. For those who do not: read it here. However, Rapunzel had just had her hair cut, so it might not be long enough to let her prince climb up! She may get very sad..
Challenge
Your task is to write a function that evaluates what Rapunzel will be saying when the prince calls for her to let her hair down: When her hair is longer than or equal to the tower is tall plus an extra meter (safety guidelines), she becomes veeeery happy and says Aaaah!
, with the number of a
s being the same as length of her hair - height of the tower
. Otherwise, her hair does not have sufficient length, and she starts crying: Booho!
, where the o
s before the h
equal two thirds of height of the tower - length of her hair
, and the o
s after the h being the rest. The number of o
s after the B
must be rounded, so if you get 2.6
, there will be 3 o
s, and the others must be after the h
.
I/O
You are given positive integers (including null) as arguments, as a list or as two single numbers, in the order you find it the most convenient, but you must state in which order you take them. As the output, print what Rapunzel will be saying.
Test cases
In the test cases, the first number will be the hair length.
0, 0 -> 'Bh!' (probably a dry sob..)
2, 1 -> 'Aah!'
1, 2 -> 'Boh!'
1, 4 -> 'Booho!'
4, 1 -> 'Aaaah!'
2, 4 -> 'Boho!'
This is code-golf, so the shortest answer in bytes wins!
0
? BTW, positive integers (including null) == _non-negative integers :) \$\endgroup\$0
too. Still, she has to get out of the window, and the restrictions for safety apply here too! There's no way she can marry him if she's got herself a broken neck. \$\endgroup\$