Skip to content

Instantly share code, notes, and snippets.

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");
#!
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]
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);
}
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){
#include "dot.h"
#include "ofMain.h"
struct dot {
int x;
int y;
float r;
ofColor color;
};
#include "block.h"
#include "ofMain.h"
struct block{
int x;
int y;
int z;
float h;
float w;
float d;
#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
*