Need help for this problem

Anyone, need help to code for the below problem statement. thanks in advance

Try to determine the maximum width and height that your terminal and screen can comfortably fit without wrapping. If someone passes a value greater than either maximum, your function should return False.

shutil.get_terminal_size()?

is there any other ways, other than shutil, script maybe, thanks.

Homework question?

I don’t see another way to get the info. Could it be that you are asked to do this just once (by filling the screen with characters and counting them) and write the numbers literally in your code?