summaryrefslogtreecommitdiff
path: root/CST116-lab1-Crombie-pseudocode.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-lab1-Crombie-pseudocode.txt')
-rw-r--r--CST116-lab1-Crombie-pseudocode.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/CST116-lab1-Crombie-pseudocode.txt b/CST116-lab1-Crombie-pseudocode.txt
new file mode 100644
index 0000000..07b91e9
--- /dev/null
+++ b/CST116-lab1-Crombie-pseudocode.txt
@@ -0,0 +1,39 @@
+Declare functions
+Declare variables and set equal to 0
+Run function to get length
+ Print "Enter kite length in centimeters: "
+ Input length
+ While length is greater than 400
+ Ask user to re-input length
+ While length is less than 1
+ Ask user to re-input length
+Set length equal to input
+Run function to get width
+ Print "Enter kite width in centimeters: "
+ Input width
+ While width is greater than 400
+ Ask user to re-input width
+ While width is less than 1
+ Ask user to re-input width
+Set width equal to input
+Run function to calculate aspect ratio
+ Set aspectRatio equal to width divided by length
+ Print the length entered by the user
+ Print the width entered by the user
+ Print "Your kite's aspect ratio is: "
+ Print aspectRatio
+ If aspectRatio is greater than or equal to 1
+ Print warning message
+Run function to calculate area
+ Set area equal to width multiplied by length, all divided by 2
+ Set area equal to previous area multiplied by 10000
+ Print the area of the kite
+Set area equal to what was calculated
+Run function to calculate mass
+ Declare variable for fabric weight
+ Set mass equal to area times fabricWeight all divided by 1000
+ Print the kite's mass
+Set mass equal to what as calculated
+Run function to calculate gravitational pull
+ Set gravitationalPull equal to mass times 9.8
+ Print the kite's gravitational pull \ No newline at end of file