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
#!/usr/bin/env python | |
import random, os.path | |
#import basic pygame modules | |
import pygame | |
from pygame.locals import * | |
#see if we can load more than standard BMP | |
if not pygame.image.get_extended(): |
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
#I McTavish | |
#Nov 13, 2016 | |
#Linear search - measure how long a linear search takes | |
import datetime #used to track time | |
def linear_search(value, list): | |
for i in range(len(list)): | |
if list[i] == value: | |
return i | |
return "item not found" |
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