Skip to content

Instantly share code, notes, and snippets.

View quackduck's full-sized avatar
running...

Ishan Goel quackduck

running...
View GitHub Profile
@quackduck
quackduck / AssertVerifier.java
Created February 9, 2022 02:42
Solve AP CS A assertion problems automatically
package assertion;
import java.util.ArrayList;
public class AssertVerifier {
static int numConditions = 3;
static int numPoints = 5;
// numbers to test
static int start = -100000;
public class Projectile {
public double angleOfLaunch; // in radians
public double initialX; // in meters
public double initialVelocity; // in m/s
public boolean useTimeToMaxHeight = false;
private double gravity; // m/s^2
package main
import (
"bufio"
"io"
"io/ioutil"
"math/rand"
"os"
"strings"
"time"
@quackduck
quackduck / kolakoski.go
Created March 10, 2021 15:40
Implement a kolakoski sequence generator: OEIS:A000002
package main
import (
"fmt"
"strconv"
"strings"
)
var (
// n is the number of terms to calculate
//Pins
int redled = 11;
int greenled = 10;
int blueled = 9;
int an2 = 2;
//Colours
int red = 255;
int green = 255;
int blue = 255;