UserPreferences

IrinaMoissiu


  1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
 29 
 30 

def avg(list):
  #I'm not really sure where we get our info for the "list" part

sum=0
for i in the range(0,len(list)): ##I have the feeling that this should be len(list)-1. B/c ###################################otherwise you will have 8 spots in the list instead of 7 (if the ###################################length is 7)
  sum=sum + list[i]
  return answer

if i=len(list)#### so this should also be len(list)-1
  then sum/len(list)
  return answer

###I'm all confused as to what we accomplished by writing this code. I thought we were trying to ###find avg. coalescence time, not the avg of the lists.  Unless the lists are composed of the ###coalescence times.  So then avg(list) should have the length of 100 spots (i's), because each
###length is simulated 100 times.

###Hmmm...I'm confused.

###Ok.  We have a list [2,5,3,7,8].  Each number inside represents the length of the _sequence_ to 
###be simulated.  I think this list is taken from a file? 

### And the numbers in the _sequence_ are picked randomly from the code written in Microproject 2. ###And each sequence, regardless of length should be simulated 100X.

### it should go like this:  _sequence_ of length 2 :::  [4,6]  [7,10] ....all the way to 100
###                          _sequence_ of length 5 :::  [2,6,9,1,0]  [7,4,1,0,0]...to 100
###                          _sequence_ of length 3
###                          _sequence_ of length 7
###                          _sequence_ of length 8

## I probably have it wrong. Plus I can't put it into code even if I had it right.  :(