TASK 1

Matching Brackets

Your task is to implement the function

def match_brackets(s: str) -> bool:

This takes a string s as input, and returns true if every ( has a matching )

Note: you can use string slices, "Hello"[1:4] returns "ell"

Your code should work with all possible strings, by ignoring anything that is not "(" or ")".


Some Examples:

Well done!

You have completed all of the tasks.

Return home or take a look at the tutorials

Something isn't quite right...

Close this message and have another go!

GUIDE

This guide is intended to help with syntax. See the prelude section for pre-defined functions and variables. See the tutorials page for tutorials on how to write code.



Can't find what you're looking for?

Check the tutorials page for more!

PRELUDE

The prelude is all the pre-defined functions and variables available to use. See the tutorials page for tutorials on how to write code.



Can't find what you're looking for?

Check the tutorials page for more!