[Question]
  [
### Description
I guess everyone knows the fairy tale of Rapunzel and the prince. For those who do not: [read it here.](http://www.pitt.edu/%7Edash/grimm012.html) 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](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest answer in bytes wins!
  
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~43 41 40 38 34 33 32~~ 31 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
*~~There's probably a much~~ Is there a shorter way though~~!~~ ? ...this was quite some golfing!*
```
‘:3;ạ¥⁸4ẋ+;€⁹¦7Ṛṭ;8ị“øŻPLC»
ạç>
```
A full program printing the result\*.
**[Try it online!](https://tio.run/##AUoAtf9qZWxsef//4oCYOjM74bqhwqXigbg04bqLKzvigqzigbnCpjfhuZrhua07OOG7i@KAnMO4xbtQTEPCuwrhuqHDpz7///8xNP8yNA "Jelly – Try It Online")**
### How?
```
‘:3;ạ¥⁸4ẋ+;€⁹¦7Ṛṭ;8ị“øŻPLC» - Link 1: number, abs(hair-tower); number, (hair > tower)?
‘                           - increment -> abs(hair-tower)+1
 :3                         - integer divide by 3 -> (abs(hair-tower)+1)//3
                            -   ...the remainder amount after removing 2/3 rounded
      ⁸                     - chain's left argument, abs(hair-tower)
     ¥                      - last two links as a dyad:
    _                       -   subtract (yields the 2/3 rounded amount)
   ;                        - concatenate
       4ẋ                   - repeat 4 (vectorises) (i.e. [[4,4,...],[4,...]])
         +                  - add (hair > tower)? (vectorises) (i.e. 4s->5s if so)
             ¦              - sparse application:
          ;€  7             - of:  concatenate €ach with a 7
            ⁹               - to indexes: chain's right argument, (hair-tower)?
               Ṛ            - reverse the list
                ṭ           - tack (hair-tower)?
                 ;8         - concatenate an 8
                    “øŻPLC» - compression of the word "Abroach" & the string "!B"
                   ị        - index into "Abroach!B" (1-indexed & modular, so 0->B)
                            - implicit (smashed) print
ạç> - Main link: number, hair; number, tower
ạ   - absolute difference -> abs(hair-tower)
  > - greater than? -> (hair > tower)? (1 if so, else 0)
 ç  - call the last link (1) as a dyad
```
\* As a monadic link it returns a list of characters and lists of characters e.g. `['B', [['o', 'o', 'h'], ['o']], '!']`, as a full program the implicit print smashes this e.g. `Booho!`
[Answer]
# [Python 3](https://docs.python.org/3/), 87 bytes
```
lambda l,h:["B"+"o"*round((h-l)*2/3)+"h"+"o"*round((h-l)/3),"A"+"a"*(l-h)+"h"][l>h]+"!"
```
[Try it online!](https://tio.run/##ZYpBDoIwEEX3nmKc1bSdRiisSCTRa2AXGELapLaE4MLTV2rYuXr57/3ls7kUmzxfHzmMr@c0QmDXDXhHhQnlmt5xInI6CGkujVDo/sKuGW@7HlFS0O53skPonVV4xjynFTz4CANVDJVgIMNQF9YM5mBb2B7elG27Eyyrjxt5BtQ9IMNM0guRvw "Python 3 – Try It Online")
Arguments to the function are taken in the order `length of hair`, `height of tower`.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~38~~ ~~35~~ 32 bytes
Input order: `length of hair`, `height of tower`
```
‹i¹α'a×"Aÿh!"ë¹-x‚>3÷R'o×'hý…Bÿ!
```
[Try it online!](https://tio.run/##AT0Awv8wNWFiMWX//@KAuWnCuc6xJ2HDlyJBw79oISLDq8K5LXjigJo@M8O3Uidvw5cnaMO94oCmQsO/If//Mgo0 "05AB1E – Try It Online")
**Explanation**
```
‹i                                  # if h < l
  ¹α                                # push absolute difference of h and l
    'a×                             # repeat "a" that many times
       "Aÿh!"                       # interpolate between "A" and "h!"
 ë                                  # else 
  ¹-                                # push h-l
    x‚                              # pair with its double
      >3÷                           # increment and integer divide by 3
         R                          # reverse the list
          'o×                       # for each, repeat "o" that many times
             'hý                    # merge the o's on "h"
                …Bÿ!                # interpolate between "B" and "!"
```
[Answer]
# Javascript, ~~105~~ 97 bytes
Thanks to Oki for helping save 7 bytes!
```
p=(t,s)=>(s||"o").repeat(t)
l=>h=>(d=l-h,o=d/3-.5|0,l>h?`A${p(d,"a")}h`:`B${p(o-d)}h`+p(-o))+"!"
```
Defines an anonymous currying function. Use like `f(length)(height)`
[Try it online!](https://tio.run/##ZclNDsIgEEDhfW8hcTGTAv60bkyo0ZOUFCo1pEMKcWM9O7ZLdfm@99BPHbtpCEmMZGzOQUHiEVUDcZ4ZMZSTDVYnSFj0yqvGLcsoLxwnZXaVkKd5z33jLu11@wpgONMM3649t7e1SZi1ygCCEEu2YbmjMZK30tMdejgiVIjFN1a4@C8eEOo/rHFxzB8 "JavaScript – Try It Online")
[Answer]
# PHP>=7.1, 111 bytes
```
[,$h,$t]=$argv;echo BA[$b=$h>$t],($r=str_repeat)(oa[$b],$c=round(($a=abs($h-$t))*($b?:2/3))),h,$r(o,$a-$c),"!";
```
[PHP Sandbox Online](http://sandbox.onlinephpfunctions.com/code/ff61ba88498ebfbd0f153e075e1e1d5bd6add1b4)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 32 bytes
```
_‘”aẋŒt;⁾h!ɓ_÷1.,3+.”oẋ“Bh!”żð>?
```
[Try it online!](https://tio.run/##y0rNyan8/z/@UcOMRw1zEx/u6j46qcT6UeO@DMWTk@MPbzfU0zHW1gNK5QOlHjXMccpQBHKO7jm8wc7@////Rv9NAA "Jelly – Try It Online")
-1 thanks to [Jonathan Allan](https://codegolf.stackexchange.com/users/53748/jonathan-allan).
Only works as full program.
Arguments are in order: hair, tower
[Answer]
# Julia, 101 bytes
```
g(h,t)=h>t?string("A","a"^(h-t),"h!"):string("B","o"^round(Int,(t-h)*2/3),"h","o"^round(Int,(t-h)/3))
```
Arguments to the function are taken in the order `length of Hair`, `height of Tower`.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 84 76 bytes
It's really rather long, but I spent too much time on this not to post it. Takes two integer arguments:
1. length of hair
2. length of tower
Any tips on golfing this would be appreciated.
```
³>⁴×111ð;ø³>⁴¬×97
97ðxø³ạ⁴
111ðxø¢L÷3×⁸ær0:1
2Çṭ2£“h”ṭµ1ÇṭµFḟ1£
>¬+65¥;¢;33Ọ
```
[Try it online!](https://tio.run/##y0rNyan8///QZrtHjVsOTzc0NDy8wfrwDgj/0JrD0y3NuSzND2@oAIk93LUQKMoFVgQSWORzeLvx4emPGnccXlZkYGXIZXS4/eHOtUaHFj9qmJPxqGEukHNoqyFY8NBWt4c75hseWsxld2iNtpnpoaXWhxZZGxs/3N3z//9/Q6P/RiYA "Jelly – Try It Online")
[Answer]
# R, 117 bytes
```
x=diff(scan());cat(`if`(x>0,paste0("A",rep("a",x),"h!"),paste0("B",rep("o",F<-round(-2*x/3)),"h",rep("o",-x-F),"!")))
```
A bit long, pretty sure this can be golfed down. Takes input from STDIN in the order `Tower, Hair`.
[Answer]
# [Python 2](https://docs.python.org/2/), 77 bytes
```
lambda h,t:("BA"+(abs(h-t)*2+1)/3*"oa"+"h"+(abs(h-t)+1)/3*"ao"+"h!!")[h>t::2]
```
An unnamed function taking hair length, `h`, and tower height, `t`, and returning a string.
**[Try it online!](https://tio.run/##TYxBDoIwEEX3nqLOagYGpWNXTSTRa6iLEkNKIpRgN4Zw9grEhZuXn/eTN3yiD72k5nxPL9fVT6c8R4twvUCOrn6jLyJlkms6njIIDnLwf8/Pu7D6/R7o5qtorTxSE8Y1pdpeIZZcEqOwXqhZNpqFZjOybW1YDJHdqWFs@4gwlTOrSc@qqNQkMxyWZOciLlVuVhJR@gI "Python 2 – Try It Online")**
Builds a string starting with `BA`, followed by two thirds of the difference rounded of the string `oa` repeated, followed by a single `h`, then the remainder amount of `ao` repeated, and finally `h!!`. The return value is then every second character starting with either the `B` or `A` via the slice notation `[h>t::2]`.
[Answer]
## Perl, 107 bytes
Takes hair length first, tower length second.
```
sub b{(($c=$_[0]-$_[1])>0?'A'.'a'x--$c.'h':do{$o=int(2/3*($c*=-1)+.5);'B'.('o'x$o).'h'.('o'x($c-$o))}).'!'}
```
]