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
| var recipe = { | |
| title: "Banana Bread", | |
| serving: 3, | |
| ingredients: ["Flour","Water","Banana"] | |
| }; | |
| background(41, 0, 0); | |
| fill(255, 0, 255); | |
| textSize(20); | |
| text(recipe.title, 10, 23); | |
| text("Servers: " +recipe.serving, 10, 55); |
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
| var movies = [ | |
| { | |
| title: "Puff the Magic Dragon", | |
| review: "Best movie ever!!" | |
| }, | |
| { | |
| title: "I Hate Chris+6+", | |
| review:"Chris is Trash" | |
| } | |
| ]; |
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
| background(148, 92, 8); | |
| var book = { | |
| title: "Cinder", | |
| stars: 5 | |
| }; | |
| // draw shelf | |
| fill(173, 117, 33); | |
| rect(0, 120, width, 10); | |
| rect(0, 243, width, 10); |
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
| var Rainbow = function(radius,x,y){ | |
| this.radius=radius; | |
| this.x=x; | |
| this.y=y; | |
| }; | |
| var drawRainbow = function(rainbow){ | |
| noFill(); | |
| strokeWeight(5); | |
| stroke(255, 0, 0); |
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
| background(204, 243, 255); | |
| //clouds | |
| fill(255, 255, 255); | |
| rect(20,42,75,55,465); | |
| rect(201, 130, 75, 55, 465); | |
| rect(336, 58, 75, 55, 465); | |
| //textbubble | |
| fill(255, 158, 158); |
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
| /************* | |
| *OBJECT TYPES | |
| **************/ | |
| /****************** | |
| *Flower Object Type | |
| *******************/ | |
| var Flower = function(x,y, height) { | |
| this.x=x; | |
| this.y=y; | |
| this.height=height; |
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
| /* | |
| Challenge Box office hits database | |
| This database contains an incomplete list of box office hits and their release year. | |
| You're going to get results back out of the database in different ways! | |
| */ | |
| CREATE TABLE movies (id INTEGER PRIMARY KEY, name TEXT, release_year INTEGER); | |
| INSERT INTO movies VALUES (1, "Avatar", 2009); | |
| INSERT INTO movies VALUES (2, "Titanic", 1997); | |
| INSERT INTO movies VALUES (3, "Star Wars: Episode IV - A New Hope", 1977); |
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
| /*Create a table named songs and enter your favorite songs*/ | |
| CREATE TABLE songs ( | |
| id INTEGER PRIMARY KEY, | |
| title TEXT, | |
| artist TEXT, | |
| mood TEXT, | |
| duration INTEGER, | |
| released INTEGER); | |
| INSERT INTO songs (title, artist, mood, duration, released) |
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
| /* Create a database of songs and artists */ | |
| CREATE TABLE artists ( | |
| id INTEGER PRIMARY KEY AUTOINCREMENT, | |
| name TEXT, | |
| country TEXT, | |
| genre TEXT); | |
| INSERT INTO artists (name, country, genre) | |
| VALUES ("Taylor Swift", "US", "Pop"); | |
| INSERT INTO artists (name, country, genre) |