This file contains hidden or 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
from sense_hat import SenseHat | |
import time | |
p = (128, 0, 255) | |
b = (0, 0, 0) | |
frame1 = [ | |
b, b, b, b, b, b, b, b, | |
b, b, b, b, b, b, b, b, | |
b, b, b, b, b, b, b, b, |
This file contains hidden or 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 found this on stack overflow but I forget where. | |
def is_prime(n): | |
""""pre-condition: n is a nonnegative integer | |
post-condition: return True if n is prime and False otherwise.""" | |
if n < 2: | |
return False; | |
if n % 2 == 0: | |
return n == 2 # return False | |
k = 3 |
This file contains hidden or 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
# just some sample code I made for demonstrating the turtle lib in Python | |
import turtle | |
import math | |
import random | |
turtle.colormode(255) | |
RGBCMY = [ |
OlderNewer