by @Gabriel Vieira Fork
{"functions":[],"name":"New Program","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_431c44a7_a725_4eb0_9f0a_4d8f16226fae"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"lugares","lengthValue2":"5","id":"id_cc65a97f_cadc_433b_8a65_4267e1444488","initValue":"20"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"bilhetes","lengthValue2":"5","id":"id_8c3e4b6b_df19_4b35_b89a_00f55266eb26","initValue":"0"},{"condition":"lugares>0","@type":"While","id":"id_98618118_9f86_4d9d_bff5_9cf4e8272723","body":{"statements":[{"newline":true,"@type":"Output","id":"id_c9e01764_89a2_4b07_bbfc_c23697613232","value":"\"Quanto bilhetes quere? \""},{"@type":"Input","name":"bilhetes","id":"id_12ce5ab8_a88f_4e11_b217_5bb19905ef54","prompt":null},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_bf956d04_0fe3_4858_b059_1c47ca325e7b","value":"\"so restam: \" + lugares + \" lugares\""}],"id":"id_75beea3b_6995_49be_b48a_97b0762a0855"},"trueBlock":{"statements":[{"@type":"Assign","name":"lugares","id":"id_25438b9e_498b_4b8c_aa74_97ea8f141e65","value":"lugares - bilhetes"},{"newline":true,"@type":"Output","id":"id_e0974a9b_db6c_4aec_b236_d9eabd785054","value":"\"restam: \" + lugares + \" lugares\""}],"id":"id_ea999630_469d_4292_bada_a01751f24cd1"},"condition":"bilhetes <= lugares","@type":"If","id":"id_c8efabab_b225_4fea_867d_0f9c1e140052"}],"id":"id_64538ec4_940b_4545_9b20_ecb02d4261f1"}},{"newline":true,"@type":"Output","id":"id_97fa4a88_6c62_4065_8c6f_596f506c92f6","value":"\"Esgotado\""},{"@type":"Return","id":"id_020e651c_8e9a_4ad2_8c0e_3fef0ce08f60","maybeValue":null}],"parameters":[]},"id":"id_b25e3713_b881_458c_bf34_663a8f13b7db","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"python","showGenCode":false},"version":"0.2","revision":852}