diff options
| author | JacobAKnox <[email protected]> | 2021-10-06 19:50:26 -0700 |
|---|---|---|
| committer | JacobAKnox <[email protected]> | 2021-10-06 19:50:26 -0700 |
| commit | 1f7c898ea3a75ecef08c81ca7bb66703b43db53c (patch) | |
| tree | bd4a1487f1621ce34d49d8f08d06e182cd2aab99 /3b | |
| parent | 3b psudocode (diff) | |
| download | archived-cst116-lab2-jacobaknox-1f7c898ea3a75ecef08c81ca7bb66703b43db53c.tar.xz archived-cst116-lab2-jacobaknox-1f7c898ea3a75ecef08c81ca7bb66703b43db53c.zip | |
psudocode corrections
Diffstat (limited to '3b')
| -rw-r--r-- | 3b/psudocode.txt | 2 | ||||
| -rw-r--r-- | 3b/psudocodeCorrections.txt | 59 |
2 files changed, 60 insertions, 1 deletions
diff --git a/3b/psudocode.txt b/3b/psudocode.txt index 5696f5e..611baf9 100644 --- a/3b/psudocode.txt +++ b/3b/psudocode.txt @@ -4,4 +4,4 @@ len = string.len out = "" for i = len-1; i < 0; i-- out += s[i] -retrun out
\ No newline at end of file +retrun out diff --git a/3b/psudocodeCorrections.txt b/3b/psudocodeCorrections.txt new file mode 100644 index 0000000..4e03625 --- /dev/null +++ b/3b/psudocodeCorrections.txt @@ -0,0 +1,59 @@ +1. +Display "Enter old wage: " +Read Old_wage + +New_wage = Old_wage * .06 + +Display Old_wage +Display "+6%=" +Display New_wage + +fixed + +Display "Enter old wage: " +Read Old_wage + +New_wage = Old_wage * 1.06 //old version would output 6% of the old wage when you want 106% of the old wage + +Display Old_wage +Display "+6%=" +Display New_wage + +2. +Display "Enter Assignment average: " +Read Assignment_avg + +Display "Enter Test 1:" +Read Test1 + +Display "Enter Test 2:" +Read Test2 + +Display "Enter Tes1 3:" +Read Test3 + +Test_avg = Test1 * 0.15 + Test2 * 0.15 + Test3 * 0.15/3 +Class_score = Assign_avg * 0.2 + Test_avg * 0.4 + Final * 0.25 + +Display "Final score: " +Displace Class_score + +fixed +Display "Enter Assignment average: " +Read Assignment_avg + +Display "Enter Test 1:" +Read Test1 + +Display "Enter Test 2:" +Read Test2 + +Display "Enter Tes1 3:" +Read Test3 + +Test_tot = Test1 * 0.15 + Test2 * 0.15 + Test3 * 0.15 //gives a value between 0 and 0.45 based on how well you did on the tests +Class_score = Assign_avg * 0.25 + Test_tot + Final * 0.25 //tests are already in the 0-1 range needed for this calculation and do not need to be multiplied, assignments are 25% of the grade +Converted_score = Class_score * 100 //convert the score to a 0-100 range for easier readability, peresonal prefrence + +Display "Final score: " +Displace Converted-score // print the converted score instead |