Create Task

by elana1
See Code Download Embed
- I created the variable grades to hold the list of value
- I created a block that inputs a test grade from the user into the grades list
- I abstracted the inputting block to reduce redundancy 
- I tested my get test grades until i was satisfied
- i created a block that adds all the values of the list 
- I put the addition block in a set block, making it into a get unavg total block
 - I created a block that finds the # of values in grades and set that value in a different variable 
- I created a block that calculates the user's average by dividing the unavg total by the number of test grades 
- I created a block that resets all values when the algorithm starts
- I abstracted the algorithm that calculates the numerical average 
- I created a block that write the number average on the screen
- I created a block that writes the letter average on the screen
- I added a clear and hide block to make the writing in the stage legible
THIS IS A BUG THAT I RAN INTO
***The script in the ask block was too long so I decided to have the sprite say the question and then ask a short version of the question in order to receive the user's input. However, the say block would not appear which happened because there was a hide block, which hides the sprite and any text it says, inside of the abstracted reset values block. I fixed this bug by moving the hide block in the sequence so that it would be executed afterthe sprite displayed its text****
CODE COMPLETED

Created April 26, 2020

Last updated May 26, 2020

Published May 26, 2020