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 pygame | |
import random | |
from city_scroller import Scroller | |
BLACK = (0, 0, 0) | |
WHITE = (255, 255, 255) | |
GREEN = (0, 255, 0) | |
RED = (255, 0, 0) | |
BLUE = (0, 0, 255) | |
GREY = (129, 129, 129) |
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 pygame | |
import random | |
# Define some colors | |
BLACK = (0, 0, 0) | |
WHITE = (255, 255, 255) | |
GREEN = (0, 255, 0) | |
RED = (255, 0, 0) | |
BLUE = (0, 0, 255) |
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
from turtle import * | |
def polygon(number_of_sides, side_length, color): | |
penup() | |
forward(2) | |
pencolor(color) | |
pendown() | |
for i in range (6): | |
forward(2) | |
right(360/ number_of_sides) |
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 pygame | |
import random | |
# Define some colors | |
BLACK = (0, 0, 0) | |
WHITE = (255, 255, 255) | |
GREEN = (0, 255, 0) | |
RED = (255, 0, 0) | |
BLUE = (0, 0, 255) |
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
from PIL import Image | |
userInputImage = input("Choose an image to alter .jpg.") | |
im = Image.open(userInputImage) | |
data = list(im.getdata()) #gets the the RGB values of each pixel | |
def addTuples(tuple): | |
return tuple[0] + tuple[1] + tuple[2] | |
red = (140, 35, 24) |