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
"""J3 Hidden Palindrome | |
http://cemc.math.uwaterloo.ca/contests/computing/2016/stage%201/juniorEn.pdf | |
This strategy loops from the longest possible palindrome to the shortest""" | |
word=input() | |
#0-3 | |
#1-2 | |
foundpalindrome = True #sentinal value | |
keeplooping = True#Stop when palindrom found | |
#start with the longest possible, work in | |
for i in range(len(word),1,-1): |
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
GIF89a,�� 3 f � � � + +3 +f +� +� +� U U3 Uf U� U� U� � �3 �f �� �� �� � �3 �f �� �� �� � �3 �f ՙ �� �� � �3 �f �� �� ��3 3 33 f3 �3 �3 �3+ 3+33+f3+�3+�3+�3U 3U33Uf3U�3U�3U�3� 3�33�f3��3��3��3� 3�33�f3��3��3��3� 3�33�f3ՙ3��3��3� 3�33�f3��3��3��f f 3f ff �f �f �f+ f+3f+ff+�f+�f+�fU fU3fUffU�fU�fU�f� f�3f�ff��f��f��f� f�3f�ff��f��f��f� f�3f�ffՙf��f��f� f�3f�ff��f��f��� � 3� f� �� ̙ ��+ �+3�+f�+��+̙+��U �U3�Uf�U��U̙U��� ��3��f�����̙���� ��3��f�����̙���� ��3��f�ՙ��̙���� ��3��f�����̙��� � 3� f� �� �� ��+ �+3�+f�+��+��+��U �U3�Uf�U��U��U�̀ ̀3̀f̀�̀�̀�̪ ̪3̪f̪�̪�̪��� ��3��f�ՙ�������� ��3��f���������� � 3� f� �� �� ��+ �+3�+f�+��+��+��U �U3�Uf�U��U��U��� ��3��f����������� ��3��f����������� ��3��f�ՙ�������� ��3��f��������� !� � , ,� � � H����*\Ȱ�Ç#J�H��ŋ3j�ȱ�Ǐ C�I��ɓ(S�\ɲ�˗0cʜI��͛8s��ɳ�ϟ@� | |
J��ѣH�*]ʴ�ӧP�J�J��իX�j�ʵ�ׯ`ÊK��ٳhӪ]˶�۷p�ʝK��ݻx���˷�߿�L���È+^̸��ǐ#K�L���˘3k��̹��ϠC�M�.�ӨS�^ͺ��װc˞���Eڸs��ͻ�튽�.�7E�ȓ+gm|���Ћ7���l����Վ�!��+����濦?Op}W�����:�|����翺z����T�V |
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 libraries | |
#Uses http://stackoverflow.com/questions/13215215/python-tkinter-animation | |
import tkinter | |
#Set width, height, frames per second and how long to cross | |
CANVAS_WIDTH = 800 | |
CANVAS_HEIGHT = 600 | |
FPS = 120 | |
SECONDS_TO_CROSS = 1.5 |
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
class BANK_ACCOUNT: | |
"""Bank account | |
has balance, and withdraw and deposit functions""" | |
def __init__(self): | |
self.balance = 0 | |
def deposit(self, amount): | |
"""adds money to the balance""" | |
self.balance += amount | |
def __str__(self): | |
return "Balance is: $" + str(format(self.balance,".2f")) |
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
#Name | |
#date | |
#goal: create a program that displays random circles on the screen | |
import tkinter#Library | |
import random #Library for random numbers | |
#Global variables | |
CANVAS_WIDTH = 800 | |
CANVAS_HEIGHT = 600 |
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