summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Bouchillon <[email protected]>2022-10-16 17:37:14 -0700
committerGitHub <[email protected]>2022-10-16 17:37:14 -0700
commit2cc981d28349be999cbb31c9033aecf56cc5578e (patch)
treebbc6f5c0bc091d01a0f9ce271db48013f698ba6c
parenttxt file added (diff)
downloadcst116-lab1-daboochillin-master.tar.xz
cst116-lab1-daboochillin-master.zip
Add files via uploadHEADmaster
-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