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
#While this particular version takes files of the text on my followers and following pages, | |
#it can be easily modified to check a past list of followers against a more recent list - | |
#just replace following.txt with the "past followers" file and followers.txt with "present followers". | |
#encoding may be 'utf-8' depending on the type of files you are using | |
with open('following.txt', 'r', encoding = 'latin-1') as following_file: | |
with open('followers.txt', 'r', encoding = 'latin-1') as followers_file: | |
discrepancy = set(following_file).difference(followers_file) |
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
def open_file(file_name): | |
file_object = open(file_name, 'r', encoding = 'ISO-8859-1') | |
return file_object | |
def water_calculator(weight, activity_leveler, size): | |
ounces = ((weight * (2/3))+((activity_leveler/30)*12)) | |
total_ounces = ounces*size | |
return total_ounces | |