New course! Every coder should learn Generative AI!
Try a free lesson+ 2
You can learn how others did it on this assignment in Learn section (mobile app users only).
https://www.sololearn.com/learn/4564/?ref=app
Alternatively, you can visit Code Playground ( https://www.sololearn.com/Codes/ ) and use the search facility to seek for examples.
You can use "Parentheses" (without quotes) as search keyword in Search bar, and pick a language of your choice from language filter menu to the right most side of the Search bar, you'll get loads of code examples to learn from.
Good luck!