summaryrefslogtreecommitdiff
path: root/BlankConsoleLab
diff options
context:
space:
mode:
authorabd00l4h <[email protected]>2022-10-19 20:56:25 -0700
committerGitHub <[email protected]>2022-10-19 20:56:25 -0700
commit6b6d4d45f95fc6df6c3a06a827b59896f94880f8 (patch)
tree213c441ec89abaf2a460131c23bf51c6ff87e714 /BlankConsoleLab
parentadded endl to note (diff)
downloadcst116-lab1-abd00l4h-master.tar.xz
cst116-lab1-abd00l4h-master.zip
Add files via uploadHEADmaster
Diffstat (limited to 'BlankConsoleLab')
-rw-r--r--BlankConsoleLab/CST116-Lab1-Output-Havaldar.txt26
-rw-r--r--BlankConsoleLab/CST116-Lab1-PsuedoCode-Havaldar.txt38
2 files changed, 64 insertions, 0 deletions
diff --git a/BlankConsoleLab/CST116-Lab1-Output-Havaldar.txt b/BlankConsoleLab/CST116-Lab1-Output-Havaldar.txt
new file mode 100644
index 0000000..562ddbb
--- /dev/null
+++ b/BlankConsoleLab/CST116-Lab1-Output-Havaldar.txt
@@ -0,0 +1,26 @@
+Output:
+
+Please enter the length of your kite.
+134
+Please enter the width of your kite.
+45
+So the length is 134cm and the width is 45cm.
+The area of your kite is 0.3015 square meters.
+Your kite weighs 0.398885 kg.
+
+Alternative Output:
+
+Please enter the length of your kite.
+450
+Please enter a length between 1 and 400.
+Please enter the length of your kite.
+350
+Please enter the width of your kite.
+0
+Please enter a width between 1 and 400.
+Please enter the width of your kite.
+350
+So the length is 350cm and the width is 350cm.
+The area of your kite is 6.125 square meters.
+NOTE: A lower aspect ratio (below 1) would provide more stability
+Your kite weighs 8.10337 kg. \ No newline at end of file
diff --git a/BlankConsoleLab/CST116-Lab1-PsuedoCode-Havaldar.txt b/BlankConsoleLab/CST116-Lab1-PsuedoCode-Havaldar.txt
new file mode 100644
index 0000000..427b54c
--- /dev/null
+++ b/BlankConsoleLab/CST116-Lab1-PsuedoCode-Havaldar.txt
@@ -0,0 +1,38 @@
+Start Program
+
+Initialize float variables length, width, area, aspectRatio, mass, and gPull
+Initialize boolean variables glength and gwidth as false
+
+While glength is false
+ Ask user for length of kite and store input as length
+ If length is not between 1-400
+ ask user to input length again
+ else
+ set glength to true
+ break loop
+
+While gwidth is false
+ Ask user for width of kite and store input as length
+ If width is not between 1-400
+ ask user to input width again
+ else
+ set gwidth to true
+ break loop
+
+Output the width and the length of the kite
+
+set area equal to width multiplied by length and divide the product by 2
+Divide area by 10000
+
+Output area of kite in square meters to user
+
+set aspectRatio equal to width divided by length
+
+If aspectRatio is greater or equal to 1
+ tell user that a aspect ratio under 1 would provide more stability
+
+set mass equal to area multiplied by 135 and divide product by 1000
+
+set gPull equal to mass multiplied by 9.8
+
+output gPull to user as weight of kite \ No newline at end of file