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
# Kevin Cao | |
# March 9, 2015 | |
# define intro function | |
def intro(): | |
# give rules | |
print ("This is a puzzle favored by Einstein. \nYou will be asked to enter a three digit number, \nwhere the hundred's digit differs from the one's digit \nby at least two. \nThe procedure will always yield 1089.") | |
# define function einstein | |
def main(): | |
# prompt user for number |
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
import YOUR_AI_FILENAME_HERE as AI | |
def get_sharpness(move_sequence: str): | |
def change_in_sharp(current_sharp: int, action: str): | |
if action == 'P' and current_sharp > 0: | |
return current_sharp - 1 | |
elif action == 'S': | |
return current_sharp + 1 | |
else: | |
return current_sharp |
NewerOlder