Starting from:
$30

$24

Closed Lab 2 List Comprehensions SOlution

Description: Along with this document, you downloaded one directory: datafiles. This is very similar to the directory you used in Program 1. The only di erence is that some of the run.x directories within datafiles now include an additional le called run.x.rand. Note that all of the run.x directories contain a le called run.x.random. Please do not confuse the two.




Details: You will write several list comprehensions. Some of you will nd them challenging. If so, I suggest that you rst 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.










Write a list comprehension that creates a list of run.x directories that contain a run.x.rand le.



Write a list comprehension that creates a list of run.x directories for which x is an even integer.



Write a list comprehension that creates a list of pairs (run.x, run.y) such that x + y 0 mod 100.








































































1

More products