summaryrefslogtreecommitdiff
path: root/CST116-Lab1-Pearse-Pseudocode.txt
diff options
context:
space:
mode:
authorTim Pearse <[email protected]>2022-10-19 21:57:40 -0700
committerTim Pearse <[email protected]>2022-10-19 21:57:40 -0700
commit5dd3fd98623ab65f183be9fb2430c1182cbfabc0 (patch)
tree8210ecc3f22189081c2124719f6262e5c07467d8 /CST116-Lab1-Pearse-Pseudocode.txt
parentSetting up GitHub Classroom Feedback (diff)
downloadcst116-lab1-legokid1503-5dd3fd98623ab65f183be9fb2430c1182cbfabc0.tar.xz
cst116-lab1-legokid1503-5dd3fd98623ab65f183be9fb2430c1182cbfabc0.zip
Change 1 : Pseudocode done
Diffstat (limited to 'CST116-Lab1-Pearse-Pseudocode.txt')
-rw-r--r--CST116-Lab1-Pearse-Pseudocode.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/CST116-Lab1-Pearse-Pseudocode.txt b/CST116-Lab1-Pearse-Pseudocode.txt
new file mode 100644
index 0000000..0e95bdd
--- /dev/null
+++ b/CST116-Lab1-Pearse-Pseudocode.txt
@@ -0,0 +1,27 @@
+const float MASSPERSQUAREMETER = 0.135
+
+main(){
+ float length
+ float width
+ bool leave = false
+ while(!leave){
+ print("Please enter the length, then width of the kite in centimeters.")
+ input(length)
+ input(width)
+ if (1 <= width && width <= 400 && 1 <= length && length <= 400){
+ leave = true
+ }
+ }
+ float area = (length * width) / 2
+ area = area / 10000
+ float aspectratio = width / length
+ if (aspectratio >= 1){
+ print("Warning: a lower aspect ratio will provide more stability.")
+ }
+ float mass = MASSPERSQUAREMETER * area
+ float gravitationalPull = mass * 9.8
+
+ print("Length of the kite " + length + "cm.")
+ print("Width of the kite " + width + "cm.")
+ print("Area of the kite " + area + "m^2.")
+} \ No newline at end of file