{"functions":[],"name":"Average Scores - Assignment","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_67ac7ad6_d819_4981_88a7_b9e1b2d46724"},{"newline":true,"@type":"Output","id":"id_14b6d8d6_a824_433b_8c9a_a39187c7d124","value":"\"Enter test scores from 0 to 100\""},{"newline":true,"@type":"Output","id":"id_d74b80e5_2f32_4eb7_81fd_cbe18901b5b1","value":"\"To end the program, enter -1\""},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"testScore","lengthValue2":"5","id":"id_9c93f1a5_16af_428b_8bef_7c3633eb2d99","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"scoreCount","lengthValue2":"5","id":"id_63d44d8e_ce29_4266_b99c_4e402e8feae0","initValue":"0.0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"scoreTotal","lengthValue2":"5","id":"id_301d488e_1a63_4f2e_8b45_047587f712c0","initValue":"0.0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"scoreAverage","lengthValue2":"5","id":"id_6d94510c_0f04_4956_8edc_98a9b7b65654","initValue":null},{"@type":"Input","name":"testScore","id":"id_5243f4c5_7c8e_4d85_a62a_082fc7198e31","prompt":null},{"condition":"testScore != -1","@type":"While","id":"id_79d69ec4_fcc4_4756_b4a5_b4d15aa46539","body":{"statements":[{"@type":"Comment","id":"id_b4745dad_27e2_49b8_a9a7_889dae1f7881","text":"For this assignment, I did an if statement within a loop in order to properly conduct the assignment"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_a1e95cfb_9b51_4a62_8c79_b2799796d40c","value":"\"Score must be from 0 to 100. Try again.\""}],"id":"id_4428f782_0db4_45df_a6f6_73d45cd657f8"},"trueBlock":{"statements":[{"newline":false,"@type":"Output","id":"id_c370275f_206a_4ed8_b950_a76e3851b6b8","value":"\"Enter score: \""},{"newline":true,"@type":"Output","id":"id_09610765_ffe9_4c0e_ab49_96beae4db15e","value":"testScore"},{"@type":"Assign","name":"scoreCount","id":"id_9c855fc2_e6a0_4dca_892b_b2675bf84683","value":"scoreCount + 1"},{"@type":"Assign","name":"scoreTotal","id":"id_c680eaf8_e26d_4a9a_bc2c_240a077ab8d3","value":"scoreTotal + testScore"}],"id":"id_874fbec6_8267_42f8_a964_c26d679c47ed"},"condition":"testScore <= 100","@type":"If","id":"id_9b275540_8475_48e4_be63_f236c370de5c"},{"@type":"Input","name":"testScore","id":"id_5faef6e1_47fc_4561_83d8_f6dcc3e0d61a","prompt":null},{"@type":"Comment","id":"id_765b4aab_a0be_424e_aac0_e0f189a2ead6","text":"From here onwards, the programs should keep count of how many inputs were given and the total sum of all those inputs"}],"id":"id_b939e3e7_97e5_443b_a5bf_4283fc310be9"}},{"newline":false,"@type":"Output","id":"id_79451b9b_7d32_4cf5_90a5_082ab964679e","value":"\"Score count: \""},{"newline":true,"@type":"Output","id":"id_156d3a46_95de_4837_b43e_936677c611e8","value":"scoreCount"},{"newline":false,"@type":"Output","id":"id_d6395300_068d_4953_9364_f8368cd3b80c","value":"\"Score total: \""},{"newline":true,"@type":"Output","id":"id_4aaaf3b2_a72d_4b71_a781_9ec6bada53e3","value":"scoreTotal"},{"@type":"Assign","name":"scoreAverage","id":"id_4511a43f_030c_4719_a7f5_54795715d911","value":"scoreTotal / scoreCount"},{"newline":false,"@type":"Output","id":"id_afb4a269_3896_4036_8e45_463d9ba86c16","value":"\"Average score: \""},{"newline":true,"@type":"Output","id":"id_54e918ba_e017_4b81_8ed4_43b6c3a29dec","value":"scoreAverage"},{"@type":"Comment","id":"id_cd383ce3_ce9c_4955_9a41_27cbb1642e27","text":"Once -1 is entered, the loop ends and the current count and total sum of each score entered is divided to find the integer average. Also wished I didn’t need to use so many outputs here, FlowRun didn’t allow the use of f(\"output\", scoreCount)"},{"@type":"Return","id":"id_60bf6876_f671_4680_b802_d856b622a67f","maybeValue":null}],"parameters":[]},"id":"id_fc5e47b1_da08_4159_9197_2fac07789ba6","config":{"showDebugVars":true,"useInputPrompt":true,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"python","showGenCode":true},"version":"0.3","revision":1688}