This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sorting function | |
#Andrew Dabson onitz.net | |
def mysort(list): | |
for j in range(len(list)): #iterate through the list | |
b=j #let b be the index of the smallest value | |
for i in range(j,len(list)): #iterate through the last portion | |
if(list[i]<list[b]): #..and find the next smallest value | |
b=i | |
c=list[j] #swap the ith value with the smallest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Now that i understand (to some extent): | |
* Bayes' Rule | |
* The theorem of total probability | |
* Markov chains | |
Im going to write a program to calculate the nth probability of an event in a chain | |
""" | |
#Andrew Dabson onitz.net |