$27
Description: Along with this document, you downloaded one directory: datafiles. This
is very similar to the directory you used in Program 1. The only difference is that
some of the run.x directories within datafiles now include an additional file called
run.x.rand. Note that all of the run.x directories contain a file called run.x.random.
Please do not confuse the two.
Details: You will write several list comprehensions. Some of you will find them challenging.
If so, I suggest that you first accomplish the same task using a loop structure and
then convert that to a comprehension. You are welcome to search the interwebs for
information that will help you.
1. Write a list comprehension that creates a list of run.x directories that contain a
run.x.rand file.
2. Write a list comprehension that creates a list of run.x directories for which x is
an even integer.
3. Write a list comprehension that creates a list of pairs (run.x, run.y) such that
x + y ≡ 0 mod 100.
1