Make sure you have clean hands, a clean work surface and a grown-up to hand to help you with the oven and cutting. Then you are good to go!
Before you start
Baking the cupcakes
Sieve the flour, cocoa and bicarbonate of soda into a bowl. Then add the sugar and mix well.
Add the syrup, egg, milk and oil, and whisk until smooth.
Put the mixture into bun cases. Then grab a grown-up to help with the oven. Bake the cakes for 10 to 15 minutes.
Once the cupcakes are baked, remove them from the oven and transfer to a wire rack to cool (be careful, they will be very hot!)
Filling the centre of the cakes
Take a cupcake and cut a hole about the size of a 50p coin in the middle. Be careful not to cut all the way through the cake.
Top tip: Use the back of a piping nozzle to help you cut out the circle, it's the perfect size!
Fill the hole with coloured sweets, put a different colour in each cake: yellow, red, green or blue. These will determine what Hogwarts House you belong to.
Cover the top of the sweets with the pieces of cake you removed earlier, then press down gently with your fingers to make the top smooth.
Making the buttercream
In a large mixing bowl, beat the softened butter until light and creamy. Then slowly sift in the sugar bit by bit whilst still mixing.
Once all of the icing sugar is mixed in, add the milk and vanilla extract and mix again until smooth.
Put the buttercream into a piping bag with a star nozzle. Pipe a swirl on top of each cupcake.
Top tip: Start from the outside and work your way into the middle.
Make the Sorting Hat toppers
You can draw your own Sorting Hats or you can download our template at the top of this page.
Print out our Sorting Hat template sheet, and stick it onto brown card to make it more sturdy. Or simply draw your own hats straight onto the brown card.
Cut out the 12 hats, then stick a cocktail stick onto the back of each one with tape. Place one topper on each cupcake, and you're done!
If you made your own Sorting Hat cupcakes, we'd love to hear how you got on! Let us know in the comments below.