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
for(int x = 1; x <= 100; x++){ | |
if (x % 3 ==0 && x % 5 == 0){ | |
System.out.println ("fizzbuzz");} | |
else if (x % 3 == 0); | |
{ | |
System.out.println ("fizz"); | |
} | |
else if (x % 5 == 0); | |
{ | |
System.out.println ("buzz"); |
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 turtle | |
wn = turtle.Screen() | |
alex = turtle.Turtle() | |
fibonacci_cache = {} | |
def fibonacci(n): | |
#if we have cached the value, then return in it | |
if n in fibonacci_cache: | |
return fibonacci_cache[n] |
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
const int LED[] = {9,10,11}; | |
void setPinAndBrightnessUp (){ | |
for (double b = 2; b < 256; pow(b,1.15) ){ | |
for (int a = 0; a < 2; a++){ | |
analogWrite(LED[a],(int)b); | |
delay(20); | |
analogWrite(LED[a], 0); | |
delay(10); | |
} |
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
void changeWhite(){ | |
int threshold = analogRead(1); | |
if (threshhold > 819){ | |
digitalWrite(4,HIGH); | |
} | |
else if (threshhold > 615){ | |
digitalWrite(4,HIGH); | |
digitalWrite(5,HIGH); | |
} | |
else if (threshhold > 411){ |
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
#include "dot.h" | |
#include "ofMain.h" | |
struct dot { | |
int x; | |
int y; | |
float r; | |
ofColor color; | |
}; |
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
#include "block.h" | |
#include "ofMain.h" | |
struct block{ | |
int x; | |
int y; | |
int z; | |
float h; | |
float w; | |
float d; |
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
#include "ofApp.h" | |
#include "myship.h" | |
#include "ofMain.h" | |
#include "stars.h" | |
/* | |
*Taylor Mallory | |
*HW16 Combined trig functions with the "floating" illusion and made a partner image to float with the original image | |
* | |
* to do: create star system, music, possible video background, enemies, lazers, and point system | |
* |