I'm still not clear on if there is specific syntax for Boolean flags?

Boolean flags are like accumulators: the main idea is the pattern of how they work. There is no particular syntax; you need a plan for how to use a boolean variable to act as a flag, and where you will be checking and flipping the flag value.

Examples of other functions from the random library? / Where can we find other commands of the random module

You can see the available functions in the random library by using dir:

>>>import random
>>>dir(random)
['BPF', 'LOG4', 'NV_MAGICCONST', 'RECIP_BPF', 'Random',
'SG_MAGICCONST', 'SystemRandom', 'TWOPI', '_BuiltinMethodType',
'_MethodType', '_Sequence', '_Set', '__all__', '__builtins__',
'__cached__', '__doc__', '__file__', '__loader__', '__name__',
'__package__', '__spec__', '_acos', '_bisect', '_ceil', '_cos', '_e',
'_exp', '_inst', '_itertools', '_log', '_pi', '_random', '_sha512',
'_sin', '_sqrt', '_test', '_test_generator', '_urandom', '_warn',
'betavariate', 'choice', 'choices', 'expovariate', 'gammavariate',
'gauss', 'getrandbits', 'getstate', 'lognormvariate', 'normalvariate',
'paretovariate', 'randint', 'random', 'randrange', 'sample', 'seed',
'setstate', 'shuffle', 'triangular', 'uniform', 'vonmisesvariate',
'weibullvariate']

You can use dir(math) after importing the math library in the same way: it will show you all the available functions.

Is there a limit to how many functions you can create/use?

No, go ahead and make as many as you find useful in designing and organizing your code.

How do I use modularity to make better programs?

This is one thing we'll keep working on throughout the semester. It is a slow skill to acquire. Part of it is learning to plan programs in an organized way, and writing modular code will be part of this organization that makes it easier to write, test, and debug.

What kind of functions are particularly useful to define instead of just writing out the code?

Almost any function that you might want to use several times --- maybe in different places -- in your code. This saves the labor of writing the same code multiple times, and makes it easy to change the code in just one place, and for the change to be propagated everywhere you were using that code.