summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/Pseudo Code.txt
diff options
context:
space:
mode:
Diffstat (limited to 'BlankConsoleLab/Pseudo Code.txt')
-rw-r--r--BlankConsoleLab/Pseudo Code.txt71
1 files changed, 71 insertions, 0 deletions
diff --git a/BlankConsoleLab/Pseudo Code.txt b/BlankConsoleLab/Pseudo Code.txt
new file mode 100644
index 0000000..fa1f603
--- /dev/null
+++ b/BlankConsoleLab/Pseudo Code.txt
@@ -0,0 +1,71 @@
+// establish variables
+ int length;
+ float width;
+ float area_cm;
+ float area_m;
+ float ratio;
+ int grav = 9.81;
+ int weight = 135;
+ float grav_pull;
+ float masskg;
+
+// loop to prevent values that are < 1 or > 400
+ -do
+ User input values
+
+ print:
+ Enter length of kite in cm:
+ input_var length
+
+ Enter width of kite in cm:
+ input_var width
+
+ Feedback of values
+
+ print:
+ Length = output_var length
+
+ Width = output_var width
+
+ -while condition
+
+ 1 < length < 400
+ 1 < width < 400
+
+// calculations
+
+ -area
+ area_cm = (length * width) / 2
+
+ -Unit conversion
+ area_m = area_cm /10000
+
+ -aspect ratio
+ ratio = width / length
+
+ -mass
+ masskg = (area_m * weight) / 1000
+
+ -gravitational pull
+ grav_pull = masskg* grav
+
+// calculation outputs
+
+ -kite in meters
+ print:
+ kite area = 'area_m' square meters
+
+ -aspect ratio
+ if ratio > 1
+ print:
+ WARNING! A lower aspect ratio would provide more stability
+
+ -total mass
+ print:
+ Total mass of the kite is: 'masskg' Kg
+
+ -gravitational pull
+ print:
+ Gravitational pull applied to the kite is: 'grav_pull' Newtons
+
+