{"functions":[],"name":"LoopExercise5","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_ca31f56f_9b3a_4261_a1c7_6a265b57907c"},{"@type":"Comment","id":"id_c964b36b_f566_4f80_8f9d_931804495a28","text":"The purpose is to find N! of the input number with For-Loop. N! = (N) * (N -1) * (N - 2) *...... * 3 * 2 * 1"},{"@type":"Declare","tpe":"Integer","name":"n","id":"id_ee8e6f2c_44e6_45c4_aa7c_72abac10cba0","initValue":"0"},{"@type":"Declare","tpe":"Integer","name":"nFactorial","id":"id_22d1747c_0f2b_467c_9c3a_5e586ab7ae2d","initValue":"1"},{"@type":"Input","name":"n","id":"id_f2fac702_ec13_4c82_9826_61d7da43c72c","prompt":"Please enter a number : "},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_429775ab_5918_4ac1_8630_6c117755b175","value":"\"Can't find factorial on \" + n"}],"id":"id_9f8d1b6c_2982_434b_aafc_2267f9c1c49f"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_9a3d0e42_5342_467e_9bc8_d454f55c35aa","value":"\"\" + n + \"! = \" + nFactorial"}],"id":"id_36a2eea5_8c9a_406e_993d_a0a603c0007a"},"condition":"n == 0","@type":"If","id":"id_fd720ba2_d2c8_4ebc_bcfc_3ca2084e26f7"}],"id":"id_6265056a_6339_4ba4_8440_de325c3cea9a"},"trueBlock":{"statements":[{"falseBlock":{"statements":[],"id":"id_74b0d559_8c7d_49ec_9384_aecad28c96a3"},"trueBlock":{"statements":[{"varName":"i","incr":"-1","@type":"ForLoop","start":"n","end":"1","id":"id_9348edac_44c2_48d0_8348_f13d2d7dc7b4","body":{"statements":[{"@type":"Assign","name":"nFactorial","id":"id_bd891ceb_f810_43aa_bcc8_927a6e585a86","value":"i * nFactorial"}],"id":"id_4d8f5140_7c6a_4128_8600_a27ed0f3879c"}}],"id":"id_2168b2c8_5271_4694_a159_0570cc8882b0"},"condition":"n > 1","@type":"If","id":"id_afdcaba4_bb4e_4aaa_bd6f_a4a1c54a4bda"},{"newline":true,"@type":"Output","id":"id_fac8fd82_1285_44b8_b5f0_cff116ad3d29","value":"\"\" + n + \"! = \" + nFactorial"}],"id":"id_af4cd7f9_95b0_4ab9_8064_ada931e2afc7"},"condition":"n > 0","@type":"If","id":"id_5f05157d_b769_4df7_9f6d_a93c04e2d93b"},{"@type":"Return","id":"id_1da1398f_1746_42f8_a48a_05d46bf50294","maybeValue":null}],"parameters":[]},"id":"id_13355e81_fa7e_4e57_9ec8_733c6858547a","config":{"showDebugVars":true,"showIoBtns":true,"showFunctions":true,"lang":"python","showGenCode":true},"version":"0.2","revision":617}