From 6b6d4d45f95fc6df6c3a06a827b59896f94880f8 Mon Sep 17 00:00:00 2001 From: abd00l4h <114624309+abd00l4h@users.noreply.github.com> Date: Wed, 19 Oct 2022 20:56:25 -0700 Subject: Add files via upload --- BlankConsoleLab/CST116-Lab1-Output-Havaldar.txt | 26 +++++++++++++++ .../CST116-Lab1-PsuedoCode-Havaldar.txt | 38 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 BlankConsoleLab/CST116-Lab1-Output-Havaldar.txt create mode 100644 BlankConsoleLab/CST116-Lab1-PsuedoCode-Havaldar.txt 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 -- cgit v1.2.3