by @STUDENT Maya O (At1) Fork
{"functions":[],"name":"Apple Store","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_077bd3ff_373c_46fc_9464_2ea4b7671202"},{"newline":true,"@type":"Output","id":"id_c919e48d_8b4d_4ffb_b68b_f18cf35b2193","value":"\"Lets buy some apples!\""},{"@type":"Declare","tpe":"Integer","name":"Apples","id":"id_8c55bf87_43a9_4d93_b4e8_0fdddc65ca18","initValue":null},{"@type":"Input","name":"Apples","id":"id_83cc9248_36cb_46bd_8ee4_8f05317e8618","prompt":"How many will you buy?"},{"newline":true,"@type":"Output","id":"id_978a30ef_ec35_4192_955a_d43bf2a65160","value":"\"Apples cost £10 each so your total price is\""},{"@type":"Declare","tpe":"Integer","name":"Amount","id":"id_b67723fd_ff60_4cdf_bb92_b3a280a86838","initValue":"Apples"},{"@type":"Declare","tpe":"Real","name":"Price","id":"id_97414fab_00f9_4959_aacc_2e4afa3de54e","initValue":"10"},{"@type":"Declare","tpe":"Real","name":"Cost","id":"id_9b5f9019_d0d0_4906_990e_257aa1ba8075","initValue":"Amount * Price"},{"newline":true,"@type":"Output","id":"id_8c37aa44_2b95_4746_83d6_20fed1fed0ca","value":"Cost"},{"@type":"Declare","tpe":"String","name":"Confirm","id":"id_2038aa01_6745_4571_8d70_1ca776cf5abc","initValue":null},{"@type":"Input","name":"Confirm","id":"id_0b928ad6_008b_41cd_9239_8bed4a80a706","prompt":"Confirm your purchase (Type y or n)"},{"@type":"Declare","tpe":"Real","name":"y","id":"id_79898b5c_f256_4a3a_9938_45b989f9f63a","initValue":null},{"@type":"Assign","name":"y","id":"id_093399c9_2697_4a69_8d54_a56bd1ca613c","value":"19"},{"@type":"Declare","tpe":"Real","name":"n","id":"id_79006795_c28e_471c_96cf_1fbeef08a2a4","initValue":null},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_07f67209_96c6_4bdf_ac82_a90e3022f119","value":"\"option not available, restart purchase\""}],"id":"id_12249cbb_bfc0_4d49_a40a_9977161c2eba"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_f89a36fe_da59_40c8_8328_803c3ee7145e","value":"\"Purchase canceled. Come again soon!\""}],"id":"id_5ddda8e9_cc3e_4c11_959a_4aa7b2200d31"},"condition":"Confirm == n","@type":"If","id":"id_9ae6f570_0dfc_4031_bf6c_f7bb8fa4633e"}],"id":"id_df6452ed_fc7d_4189_afb7_d9d857089129"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_cde3535b_2e6b_4089_a291_67e1f4d1ea57","value":"\"Purchase made. Thank you!\""}],"id":"id_6acda53f_3567_4f81_b3a3_57dbe5c971b5"},"condition":"Confirm == y","@type":"If","id":"id_97b69f74_9aea_4126_9225_0da885151d24"},{"@type":"Return","id":"id_29088862_ce6e_462f_99cc_065150a6232a","maybeValue":null}],"parameters":[]},"id":"id_b8fd8bcf_0456_4e6c_80a9_e86318d3814b","config":{"showDebugVars":true,"showIoBtns":true,"showFunctions":true,"lang":"python","showGenCode":true},"version":"0.2","revision":1060}