From 5f184a1533ebf172a65f9f9f4ba85f31c177de60 Mon Sep 17 00:00:00 2001 From: JLimoo11 Date: Wed, 9 Dec 2015 13:47:07 -0500 Subject: [PATCH 1/4] Different Functions for the challenge probably need comments --- Document_1.pde | 20 ++++++++++++++++++++ Document_2/Document_2.pde | 11 +++++++++++ Document_3/Document_3.pde | 12 ++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 Document_1.pde create mode 100644 Document_2/Document_2.pde create mode 100644 Document_3/Document_3.pde diff --git a/Document_1.pde b/Document_1.pde new file mode 100644 index 0000000..1695d8d --- /dev/null +++ b/Document_1.pde @@ -0,0 +1,20 @@ +void setup() { + size(800,600); + background(355,100,400); +} + +void draw() { + drawRedRect(); +} + +void drawRedRect() { + rect(width/3,height/3,400,250); + fill(300,70,0); +} + + + + + + + \ No newline at end of file diff --git a/Document_2/Document_2.pde b/Document_2/Document_2.pde new file mode 100644 index 0000000..118882f --- /dev/null +++ b/Document_2/Document_2.pde @@ -0,0 +1,11 @@ +void setup() { + size(800, 600); +} +void draw() { + println(trianglearea(5, 20)); +} + +float trianglearea (float b, float h) { + float result= 0.5*b*h; + return result; +} \ No newline at end of file diff --git a/Document_3/Document_3.pde b/Document_3/Document_3.pde new file mode 100644 index 0000000..bfe09d4 --- /dev/null +++ b/Document_3/Document_3.pde @@ -0,0 +1,12 @@ +void setup() { + size(800,600); +} + +void draw(){ + println(force(7,9.8)); + +} +float force(float m, float a) { + float result = m*a; + return result; +} \ No newline at end of file From f4fff8ee1cab676d2107f89e2899b2f9633e4d5d Mon Sep 17 00:00:00 2001 From: JLimoo11 Date: Mon, 14 Dec 2015 14:03:25 -0500 Subject: [PATCH 2/4] Update Documentation1.md --- Documentation1.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Documentation1.md b/Documentation1.md index 28f94fa..f96ba36 100644 --- a/Documentation1.md +++ b/Documentation1.md @@ -1,19 +1,21 @@ -# Name: +# RedRectangle: ## Examples: -Insert examples here. +void draw() { + drawRedRect(); +} ## Description: -Insert description here +Function that when calls draws a large red rectangle on the screen ## Syntax: -Demonstrate syntax here +drawRedRect(); ##Parameters: -Name and describe parameters here +none ##Returns: -What type of data does it return? +void ##Other notes: Anything else? From 145996802fb2fae60fa694a55b71ff408624d8b9 Mon Sep 17 00:00:00 2001 From: JLimoo11 Date: Mon, 14 Dec 2015 14:08:33 -0500 Subject: [PATCH 3/4] Update Documentation2.md --- Documentation2.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Documentation2.md b/Documentation2.md index 28f94fa..1adce05 100644 --- a/Documentation2.md +++ b/Documentation2.md @@ -1,19 +1,21 @@ -# Name: +# Area of Triangle: ## Examples: -Insert examples here. - +void draw() { + println(trianglearea(5, 20)); +} ## Description: -Insert description here +this function finds the area of a triangle ## Syntax: -Demonstrate syntax here +println(trianglearea(a, b)); ##Parameters: -Name and describe parameters here +a: base +b: height ##Returns: -What type of data does it return? +int ##Other notes: Anything else? From 7ac7d00582ac9e50c27fdd53c4e5d4c9de50af0b Mon Sep 17 00:00:00 2001 From: JLimoo11 Date: Mon, 14 Dec 2015 14:10:55 -0500 Subject: [PATCH 4/4] Update Documentation3.md --- Documentation3.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Documentation3.md b/Documentation3.md index 28f94fa..e7318b6 100644 --- a/Documentation3.md +++ b/Documentation3.md @@ -1,19 +1,21 @@ -# Name: +# Force: ## Examples: -Insert examples here. +void draw(){ + println(force(7,9.8)); + } ## Description: -Insert description here +this function finds the force by multiplying the mass times the acceleration ## Syntax: -Demonstrate syntax here +float force(m, a); ##Parameters: -Name and describe parameters here - +m: mass +a: acceleration ##Returns: -What type of data does it return? +int ##Other notes: Anything else?