summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lab1 pseudocode -trevor bouchillon.txt34
1 files changed, 34 insertions, 0 deletions
diff --git a/lab1 pseudocode -trevor bouchillon.txt b/lab1 pseudocode -trevor bouchillon.txt
new file mode 100644
index 0000000..4971e9e
--- /dev/null
+++ b/lab1 pseudocode -trevor bouchillon.txt
@@ -0,0 +1,34 @@
+define variables kitewidth, kitelength, kiteaream, kiteareacm, kiteaspectration, kitemass, gravitationalpull
+
+while kitewidth is less than 1 or greater than 400
+display "Please enter width of kite (horizontal diagonal) in meters."
+userinput kitewidth
+if the kitewidth is less than 1
+display "Please enter a value between 1 and 400"
+elseif the kitewidth is greater than 400
+display "Please enter a value between 1 and 400"
+
+while kitelength is less than 1 or greater than 400
+display "Please enter width of kite (vertical diagonal) in meters."
+userinput kitelength
+if the kitelength is less than 1
+display "Please enter a value between 1 and 400"
+elseif the kitelength is greater than 400
+display "Please enter a value between 1 and 400"
+
+display "Your kites length is ", kitelength, " meters, and your kites width is: ", kitewidth, " meters."
+
+set kiteaream equal to (kitewidth * kitelength)/2
+set kiteareacm equal to kiteaream / 10000
+display "Your kites area in meters is: ", kiteaream, " meters squared."
+
+set kitemass equal to kiteaream * .135
+display "Your kites mass is: ", kitemass, " kilograms"
+
+set gravitationalpull equal to kitemass * 9.8
+display "The gravitational pull on your kite is: ", gravitationalpull, " Newtons."
+
+set kiteaspectratio equal to kitewidth / kitelength
+if kiteaspectratio is greater than or equal to 1
+display "Warning: Your kites aspect ratio is larger than or equal to 1. A smaller aspect ratio will provide your kite more stability."
+display "Your kites aspect ratio is: ", kiteaspectratio \ No newline at end of file