by @Francyx_009 Fork
{"functions":[],"name":"Urto Anelastico","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_19922302_2ca9_4dbb_b6a9_22a32e1bdbdd"},{"@type":"Declare","tpe":"Real","name":"m1","id":"id_0956a7c0_647c_4159_9e50_7323ed12d420","initValue":null},{"@type":"Declare","tpe":"Real","name":"m2","id":"id_38df3b0e_4666_43b8_ba3b_8a92cb95a49e","initValue":null},{"@type":"Declare","tpe":"Real","name":"v1","id":"id_f42962fa_6167_413e_819f_69d1bb08fae3","initValue":null},{"@type":"Declare","tpe":"Real","name":"v2","id":"id_0455222e_ee4e_414d_8885_4845d1886fd3","initValue":null},{"newline":true,"@type":"Output","id":"id_931ee5c7_19ec_4169_a521_eb6eff3c568c","value":"\"Masse dei due corpi in 'kg':\""},{"@type":"Input","name":"m1","id":"id_dfc31fbd_7c75_46ad_aa26_1c5551d1cb32","prompt":"Massa del primo corpo:"},{"@type":"Input","name":"m2","id":"id_1c28bada_0ebf_491d_a65c_4b2e906c1557","prompt":"Massa del secondo corpo:"},{"falseBlock":{"statements":[{"falseBlock":{"statements":[],"id":"id_9890a31f_8779_4256_a6fe_053f31a95c70"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_9140079a_1152_4e01_b4f1_a8e4ca1ab7f3","value":"\"Il primo corpo non può avere una massa negativa di: \" + m1 + \"kg\""}],"id":"id_cc5f0d8d_eadc_4e8a_a977_bc94fb799bfc"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_b67ab797_7a47_4614_b0e0_acde0ee27d33","value":"\"Il primo corpo non può avere una massa nulla\""}],"id":"id_de1ede80_77a6_4cbd_a6ab_4c69e1a6830d"},"condition":"m1 == 0","@type":"If","id":"id_78d84e99_df31_4351_9130_fc23d0fb9f94"}],"id":"id_a4e14af6_5510_4860_8911_f3531ae475cd"},"condition":"m1 <= 0","@type":"If","id":"id_9be1a894_19ac_4274_a9a3_17aa4cc617c9"},{"falseBlock":{"statements":[],"id":"id_04a79a45_adeb_4e82_bd04_eb3a3d7bd6b0"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_c4c04717_a406_404a_b0c7_6483f2e835c3","value":"\"Il secondo corpo non può avere una massa negativa di: \" + m2 + \"kg\""}],"id":"id_ac14a67d_fd7a_42ee_ba4f_432ac299d304"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_ffca3dd8_7d4c_4d51_b36c_1ed3c9cbe798","value":"\"Il secondo corpo non può avere una massa nulla\""}],"id":"id_e1a7836f_ef4a_4fe2_9834_11d267b2589f"},"condition":"m2 == 0","@type":"If","id":"id_70666a77_6166_4893_8465_e5ea38caa9a8"}],"id":"id_df7ec026_3c98_40bb_9b37_0055ef5010b3"},"condition":"m2 <= 0","@type":"If","id":"id_9c3960fe_b9e1_4ef9_a228_4f949f071ab9"}],"id":"id_7afb60fc_9216_4b36_aea4_c048d2c7fa49"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_df1e8bb0_9ca7_4ad8_966d_5628c2cfce88","value":"\"Velocità dei due corpi in 'm/s'\""},{"@type":"Input","name":"v1","id":"id_4fe69ff7_ac36_4469_8894_238111a3def0","prompt":"Velocità del primo corpo:"},{"@type":"Input","name":"v2","id":"id_b5e0b3aa_2aa1_4735_97fd_a1600330fcd0","prompt":"Velocità del secondo corpo:"},{"newline":true,"@type":"Output","id":"id_a7c0f5e2_a18d_4428_9e67_5c3cd4590e70","value":"\"Il corpo di massa: \" + m1 + \"kg\""},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_7568a76f_1c13_45d9_8454_5196b1b41bf5","value":"\"si muove verso sinistra con una velocità di: \" + abs(v1) + \"m/s\""}],"id":"id_4b1f11a1_0f80_4f95_a31a_9cb42ddea3b8"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_fad33d63_ad6d_4e2a_b7ac_54c0f12d5661","value":"\"si muove verso destra con una velocità di: \" + v1 + \"m/s\""}],"id":"id_2c083561_7cf1_476b_b7c5_8fe1db6df5c9"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_f9b598bb_a8ed_49eb_8e7d_27326fe2a229","value":"\"è fermo\""}],"id":"id_26ecb651_7255_48be_8256_294f1f220408"},"condition":"v1 == 0","@type":"If","id":"id_c1ee6a16_f3f8_42f7_b39f_450dbb740d06"}],"id":"id_839e9f4e_4bc5_458a_9d0b_c870951601b9"},"condition":"v1 >= 0","@type":"If","id":"id_36274f78_70b8_432e_b678_da0d8b234531"},{"newline":true,"@type":"Output","id":"id_3c1054ac_c055_49cb_bebd_5f976f7169bc","value":"\"Il corpo di massa: \" + m2 + \"kg\""},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_80cb53c9_54b7_497c_9011_31fa90f3fd55","value":"\"si muove verso sinistra con una velocità di: \" + abs(v2) + \"m/s\""}],"id":"id_144519ff_1aed_433c_9e68_c7a48b5150a2"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_2bafb6c4_d9a5_4454_8bcb_28cd69ac551d","value":"\"si muove verso destra con una velocità di: \" + v2 + \"m/s\""}],"id":"id_f2038df7_0923_4958_a1b6_63ce89981a79"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_a7089408_ae38_4b90_9738_810a0112a6dd","value":"\"è fermo\""}],"id":"id_0b702602_dd49_4a78_8565_e4a0603eed8f"},"condition":"v2 == 0","@type":"If","id":"id_214851c5_a538_494a_86ac_cea66163e93b"}],"id":"id_bacdf933_92fb_4f61_88b3_6a12d55b8b0a"},"condition":"v2 >= 0","@type":"If","id":"id_0dcf7659_e115_40b4_a0c0_2ea04b3f2c0a"},{"@type":"Declare","tpe":"String","name":"urto","id":"id_42757095_f969_4707_8615_8ec8692161e7","initValue":null},{"@type":"Input","name":"urto","id":"id_91cec143_08cc_47b5_b37d_567e76ca2f07","prompt":"Tipo di urto: ('Elastico' o 'Anelastico')"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_ab886730_80b3_42d7_87fe_0e1e72d376c5","value":"\"Tipo di urto non valido\""}],"id":"id_4d1bfcac_9913_4741_9036_0ad5762f3903"},"trueBlock":{"statements":[{"@type":"Declare","tpe":"Real","name":"P","id":"id_0777cfa5_f3da_47d5_bb5b_7b2daff67dac","initValue":null},{"@type":"Assign","name":"P","id":"id_f9343017_4a92_454f_a8dd_8b2a8b946a86","value":"(m1*v1)+(m2*v2)"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_40a2998b_3ecd_4b54_b64d_1c4557357d80","value":"\"DOPO UN URTO DI TIPO ANELASTICO:\""},{"newline":true,"@type":"Output","id":"id_adcb5044_0303_48ab_a62c_16c90f9602b8","value":"\"Le masse dei due corpi costituiscono un nuovo corpo\""},{"newline":true,"@type":"Output","id":"id_131cbf96_7cc7_4138_926d_9b2d14a90bf5","value":"\"di massa: \" + (m1+m2) + \"kg\""},{"newline":true,"@type":"Output","id":"id_3f65c0d3_6bd8_404f_a776_5c1f5807b4f9","value":"\"La quantità di moto, che si conserva, è:\""},{"newline":true,"@type":"Output","id":"id_82167937_5316_4722_83f2_7469bb8f4962","value":"\"P = \" + P + \"kg*m/s\""},{"@type":"Declare","tpe":"Real","name":"vf","id":"id_87bde3f5_bb66_4864_9601_3f9bf571efdc","initValue":null},{"@type":"Assign","name":"vf","id":"id_ecb3773d_09f6_4356_8181_ca18baec9332","value":"P/(m1+m2)"},{"newline":true,"@type":"Output","id":"id_3e52fb31_ae9d_4f7f_bef7_fef8fe3daa31","value":"\"La velocità finale del corpo è:\""},{"newline":true,"@type":"Output","id":"id_47c53f92_de2f_4450_99cc_8979fdae3fca","value":"\"Vf = \" + vf + \"m/s\""},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_bf372e44_8081_42c4_9cdb_fc9abdac6b76","value":"\"Il corpo dopo l'urto si sposterà quindi verso sinistra\""}],"id":"id_47c5f946_7007_4a79_8770_68b5261b2b0c"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_28751df9_6b52_428b_8d31_5944ab130b95","value":"\"Il corpo dopo l'urto si sposterà quindi verso destra\""}],"id":"id_dcf72dd4_6127_4cba_a48d_2c23bcaa56c7"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_dc250940_d8ff_4707_bad5_c1a94983aead","value":"\"Il corpo dopo l'urto rimarrà quindi fermo\""}],"id":"id_cf31f983_bbbd_4658_ab2c_7a08b7c68050"},"condition":"vf == 0","@type":"If","id":"id_e1c7788b_da99_4b6e_8d27_972fb190d790"}],"id":"id_a44cd039_b365_4da9_8a5c_57c46ae04796"},"condition":"vf >= 0","@type":"If","id":"id_8109ce67_6625_40c4_93c1_f5d4355aaea5"}],"id":"id_fae1c3de_7f99_4c31_9675_255a23e90833"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_27dd3509_da6d_4798_9e8a_ff77936ac139","value":"\"DOPO UN URTO DI TIPO ELASTICO:\""},{"newline":true,"@type":"Output","id":"id_b273c491_519b_4f1c_a918_0da142d4afa4","value":"\"I due corpi rimangono separati;\""},{"newline":true,"@type":"Output","id":"id_6ea2fab2_1c28_410b_abb8_5846d44745fe","value":"\"La quantità di moto, che si conserva, è:\""},{"newline":true,"@type":"Output","id":"id_556944e0_f42c_44e5_902d_d970bba7a2ab","value":"\"P = \" + P + \"kg*m/s\""},{"@type":"Declare","tpe":"Real","name":"K","id":"id_f4fceacc_f229_4a75_bca4_e9e864b78bd0","initValue":null},{"@type":"Assign","name":"K","id":"id_d4b13b28_7919_4b70_8a71_0a7864ab83f9","value":"(0.5*(m1*(v1*v1)))+(0.5*(m2*(v2*v2)))"},{"newline":true,"@type":"Output","id":"id_9c19ce3d_5ac6_4f38_8a86_3e67fc1b7bd9","value":"\"L'energia cinetica, che si conserva, è:\""},{"newline":true,"@type":"Output","id":"id_d7590460_d2be_4f52_9cd4_bbc5708295fe","value":"\"K = \" + K + \"J\""},{"@type":"Declare","tpe":"Real","name":"vf1","id":"id_33892818_f74a_4051_a1cc_d476281a2ff7","initValue":null},{"@type":"Declare","tpe":"Real","name":"vf2","id":"id_96bc266d_f478_4f3a_aff6_a7182d8bac7c","initValue":null},{"@type":"Assign","name":"vf1","id":"id_17a386f4_acc2_43b8_8d30_a477af476a49","value":"(((m1-m2)*v1)+(2*m2*v2))/(m1+m2)"},{"@type":"Assign","name":"vf2","id":"id_2172c3ce_8934_41b6_b5f4_1511e5bdcc3b","value":"(((m2-m1)*v2)+(2*m1*v1))/(m1+m2)"},{"newline":true,"@type":"Output","id":"id_be39e692_f034_4f25_b043_43e72686c12e","value":"\"La velocità finale del corpo di massa: \" + m1 + \"kg, è:\""},{"newline":true,"@type":"Output","id":"id_fec76b74_c109_4ba0_82b6_a4360485d8a0","value":"\"Vf1 = \" + vf1 + \"m/s\""},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_6c2d909e_dc1d_49e7_96ba_0f47eb1cab9f","value":"\"Questo corpo si sposterà quindi verso sinistra\""}],"id":"id_7f4ef448_39e7_4ee2_b125_ed92405db59a"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_e023aad2_9d37_48bf_ba70_83b969a8c55f","value":"\"Questo corpo si sposterà quindi verso destra\""}],"id":"id_e63fb8b9_6530_4a27_9023_16b3f8424244"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_63c4326c_1f56_4703_bb2c_f37598b823c6","value":"\"Questo corpo rimarrà quindi fermo\""}],"id":"id_0c6a1a21_fa9b_4c3c_ae4c_f7b09ba89983"},"condition":"vf1 == 0","@type":"If","id":"id_7c46d01d_aafc_4403_a91b_077c0e4d228f"}],"id":"id_bba9996b_836d_44be_a846_874a97049a26"},"condition":"vf1 >= 0","@type":"If","id":"id_bc06069b_36af_4f16_818a_038b171389a9"},{"newline":true,"@type":"Output","id":"id_6f808a21_6455_4767_8875_0ff6d8ea2d23","value":"\"La velocità finale del corpo di massa: \" + m2 + \"kg, è:\""},{"newline":true,"@type":"Output","id":"id_007c33f9_c3f7_431e_b16c_1e2ce42c2789","value":"\"Vf2 = \" + vf2 + \"m/s\""},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_d5474d27_be99_4c81_9d87_fafaf93b49cf","value":"\"Questo corpo si sposterà quindi verso sinistra\""}],"id":"id_85fbf61f_77e1_432f_8652_1ba510b480a3"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_703dcee8_0a58_4783_aa38_3c09b9917d21","value":"\"Questo corpo si sposterà quindi verso destra\""}],"id":"id_9440f8a9_2f5d_4514_a641_1fd9542d21a1"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_802e4408_013c_4200_8779_de90be491da6","value":"\"Questo corpo rimarrà quindi fermo\""}],"id":"id_a485d172_6500_4580_b51b_947a20903401"},"condition":"vf2 == 0","@type":"If","id":"id_b6aa2106_29f3_42a0_bbb4_52afc404281f"}],"id":"id_a9468dff_4407_434d_b19c_0fe4f8fc9e77"},"condition":"vf2 >= 0","@type":"If","id":"id_ec9897ad_5895_44cf_bfd8_2902c74222ea"}],"id":"id_4b151009_7293_461a_9a0a_ed8d69e827da"},"condition":"urto == \"Elastico\" || urto == \"elastico\"","@type":"If","id":"id_c1ad9136_f53a_42ab_9280_8c3b2dbd8c53"}],"id":"id_7acbe822_6a3d_4adf_9a2c_435ef65d528a"},"condition":"urto == \"Elastico\" || urto == \"Anelastico\" || urto == \"elastico\" || urto == \"anelastico\"","@type":"If","id":"id_09178f9d_1588_4a4c_a461_3bfcdc700b77"}],"id":"id_79cb6aea_a5d9_48f8_9562_baeb1b845185"},"condition":"m1 > 0 && m2 > 0","@type":"If","id":"id_be96ab1b_7d3e_485e_b55c_826808b274e9"},{"@type":"Return","id":"id_84ab00c9_1e9f_4c62_9f0f_525c131fc487","maybeValue":null}],"parameters":[]},"id":"id_490ec22e_11b2_4140_804d_68ae433571c0","config":{"showDebugVars":true,"showIoBtns":true,"showFunctions":true,"lang":"python","showGenCode":true},"version":"0.2","revision":2872}