That's... a limerick. Limericks are held in such low regard that they'll teach you how to make them in 3rd grade but by fifth, when they ask for "poetry" they'll accept a fucking haiku (without paying any attention to the meter or kireji) but they'll refuse to accept a limerick.
When I had to hand in poetry I'd do sonnets. Teachers were so impressed that I could handle ABBA ABBA CDE CDE that you could write straight fucking nonsense and they'd take it.
Of course they'd take straight fucking nonsense as free verse too
But not limericks