From 8d638df9738b2fdc21afb86a3221750cde07000e Mon Sep 17 00:00:00 2001 From: Dario-DC <105294544+Dario-DC@users.noreply.github.com> Date: Tue, 21 May 2024 16:36:53 +0200 Subject: [PATCH] fix(curriculum/python): improve shortest path algorithm project (#53428) Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com> --- .../meta.json | 112 +++++++++++------- .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../65576ff7888f9e96f52a4be1.md | 22 ++-- .../6557709b0aee699a6a00528c.md | 30 ++--- .../6557712d77ce2d9bd7e63afd.md | 18 +-- .../6557716aadbd2d9c42c0e69a.md | 26 ++-- .../655771d889132f9ccd341060.md | 47 +++----- .../65577236b056379d5dbc7000.md | 8 +- .../655773b0591c5f9f4045883e.md | 6 +- .../655773f8b8b5db9fc6d0ae76.md | 24 +--- .../6557743527cb92a06417ea97.md | 21 ++-- .../6557746aad2844a0cd864e12.md | 6 +- .../655774955b097ea14897db12.md | 16 +-- .../655774d01daeeaa1978b99d5.md | 12 +- .../655775221059f5a20493d5d7.md | 4 +- .../655776db1eeae0a620e42a0d.md | 4 +- .../655777060d8ddea6741be1b1.md | 4 +- .../65577739f57ecca6c39bb4e9.md | 4 +- .../65577791ad8c26a7705e2919.md | 11 +- .../65577a17564ce8a8e06c1460.md | 8 +- .../65578c17d54dfab65cd54b95.md | 8 +- .../65578c74607d40b6d8c4757f.md | 4 +- .../65578cb031cd93b77a285db2.md | 4 +- .../65578cee7f2cb8b80127cce2.md | 13 +- .../65578d0f6c78a0b868a43b9c.md | 20 +--- .../65578d4fc3afc3b8f554c882.md | 4 +- .../65578f895f2a65ba7a916804.md | 6 +- .../65578fcf00322dbad5dee05b.md | 4 +- .../655790d113d14dbb727eaf41.md | 6 +- .../6557910b0ebaeebc18209e90.md | 4 +- .../6557913b8fe5c0bc834c9f4f.md | 25 ++-- .../655791847db8a9bd0b685f40.md | 8 +- .../655791ae44c182bd92f31caa.md | 22 +++- .../655791e6cf5e03be3de73451.md | 6 +- .../65579228c669fcbebffd01d5.md | 14 ++- .../6557924d47c325bf27afbe51.md | 4 +- .../6557927ad11e58bf8c794b25.md | 6 +- .../6559d70c5161b16ff1d6530d.md | 6 +- .../6559d86fe1b8947954b9178d.md | 4 +- .../6559da1b7d75f088f5e6b89f.md | 8 +- .../6559da93115de78dbbdc7ba3.md | 6 +- .../6566195b0a021bb660b2b4b1.md | 27 +++-- .../65661b72d6745ebec6a96923.md | 56 +++++---- .../6567722f53ad97d7ea6bb082.md | 4 +- .../65774ae7c3eee66fe79b9459.md | 4 +- .../657891ab9c1903f4e55433ba.md | 14 ++- .../65789506b30453080f77470c.md | 4 +- .../6578b13757611e2825beb8a5.md | 22 ++-- .../6578b57361f2f132a02e2a18.md | 8 +- .../6579717f0920131304286804.md | 8 +- .../65797670e0c0d016f17e7660.md | 8 +- .../6579ca0923cfa7162089d2f0.md | 10 +- .../6579cbab9825b8170974c69a.md | 17 +-- .../6579cd5f6dd62c189e53ddbb.md | 18 ++- .../6579dd49fa8a8e1fd06b85a9.md | 11 +- .../65affe602a2a828b0382a058.md | 70 +++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../65576ff7888f9e96f52a4be1.md | 24 ++-- .../6557709b0aee699a6a00528c.md | 30 ++--- .../6557712d77ce2d9bd7e63afd.md | 18 +-- .../6557716aadbd2d9c42c0e69a.md | 26 ++-- .../655771d889132f9ccd341060.md | 44 +++---- .../65577236b056379d5dbc7000.md | 8 +- .../655773b0591c5f9f4045883e.md | 6 +- .../655773f8b8b5db9fc6d0ae76.md | 24 +--- .../6557743527cb92a06417ea97.md | 21 ++-- .../6557746aad2844a0cd864e12.md | 6 +- .../655774955b097ea14897db12.md | 16 +-- .../655774d01daeeaa1978b99d5.md | 12 +- .../655775221059f5a20493d5d7.md | 4 +- .../655776db1eeae0a620e42a0d.md | 4 +- .../655777060d8ddea6741be1b1.md | 6 +- .../65577739f57ecca6c39bb4e9.md | 8 +- .../65577791ad8c26a7705e2919.md | 15 +-- .../65577a17564ce8a8e06c1460.md | 10 +- .../65578c17d54dfab65cd54b95.md | 12 +- .../65578c74607d40b6d8c4757f.md | 8 +- .../65578cb031cd93b77a285db2.md | 10 +- .../65578cee7f2cb8b80127cce2.md | 17 +-- .../65578d0f6c78a0b868a43b9c.md | 22 +--- .../65578d4fc3afc3b8f554c882.md | 8 +- .../65578f895f2a65ba7a916804.md | 8 +- .../65578fcf00322dbad5dee05b.md | 10 +- .../655790d113d14dbb727eaf41.md | 8 +- .../6557910b0ebaeebc18209e90.md | 6 +- .../6557913b8fe5c0bc834c9f4f.md | 29 +++-- .../655791847db8a9bd0b685f40.md | 10 +- .../655791ae44c182bd92f31caa.md | 24 ++-- .../655791e6cf5e03be3de73451.md | 12 +- .../65579228c669fcbebffd01d5.md | 22 ++-- .../6557924d47c325bf27afbe51.md | 10 +- .../6557927ad11e58bf8c794b25.md | 8 +- .../6559d70c5161b16ff1d6530d.md | 10 +- .../6559d86fe1b8947954b9178d.md | 8 +- .../6559da1b7d75f088f5e6b89f.md | 14 +-- .../6559da93115de78dbbdc7ba3.md | 22 ++-- .../6566195b0a021bb660b2b4b1.md | 27 +++-- .../65661b72d6745ebec6a96923.md | 56 +++++---- .../6567722f53ad97d7ea6bb082.md | 10 +- .../65774ae7c3eee66fe79b9459.md | 10 +- .../657891ab9c1903f4e55433ba.md | 16 +-- .../65789506b30453080f77470c.md | 4 +- .../6578b13757611e2825beb8a5.md | 22 ++-- .../6578b57361f2f132a02e2a18.md | 8 +- .../6579717f0920131304286804.md | 8 +- .../65797670e0c0d016f17e7660.md | 8 +- .../6579ca0923cfa7162089d2f0.md | 10 +- .../6579cbab9825b8170974c69a.md | 17 +-- .../6579cd5f6dd62c189e53ddbb.md | 18 ++- .../6579dd49fa8a8e1fd06b85a9.md | 12 +- .../65affe602a2a828b0382a058.md | 70 +++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../65576ff7888f9e96f52a4be1.md | 24 ++-- .../6557709b0aee699a6a00528c.md | 30 ++--- .../6557712d77ce2d9bd7e63afd.md | 18 +-- .../6557716aadbd2d9c42c0e69a.md | 26 ++-- .../655771d889132f9ccd341060.md | 44 +++---- .../65577236b056379d5dbc7000.md | 8 +- .../655773b0591c5f9f4045883e.md | 6 +- .../655773f8b8b5db9fc6d0ae76.md | 24 +--- .../6557743527cb92a06417ea97.md | 21 ++-- .../6557746aad2844a0cd864e12.md | 6 +- .../655774955b097ea14897db12.md | 16 +-- .../655774d01daeeaa1978b99d5.md | 12 +- .../655775221059f5a20493d5d7.md | 4 +- .../655776db1eeae0a620e42a0d.md | 4 +- .../655777060d8ddea6741be1b1.md | 6 +- .../65577739f57ecca6c39bb4e9.md | 8 +- .../65577791ad8c26a7705e2919.md | 15 +-- .../65577a17564ce8a8e06c1460.md | 10 +- .../65578c17d54dfab65cd54b95.md | 12 +- .../65578c74607d40b6d8c4757f.md | 8 +- .../65578cb031cd93b77a285db2.md | 10 +- .../65578cee7f2cb8b80127cce2.md | 17 +-- .../65578d0f6c78a0b868a43b9c.md | 22 +--- .../65578d4fc3afc3b8f554c882.md | 8 +- .../65578f895f2a65ba7a916804.md | 8 +- .../65578fcf00322dbad5dee05b.md | 10 +- .../655790d113d14dbb727eaf41.md | 8 +- .../6557910b0ebaeebc18209e90.md | 6 +- .../6557913b8fe5c0bc834c9f4f.md | 29 +++-- .../655791847db8a9bd0b685f40.md | 10 +- .../655791ae44c182bd92f31caa.md | 24 ++-- .../655791e6cf5e03be3de73451.md | 12 +- .../65579228c669fcbebffd01d5.md | 22 ++-- .../6557924d47c325bf27afbe51.md | 10 +- .../6557927ad11e58bf8c794b25.md | 8 +- .../6559d70c5161b16ff1d6530d.md | 20 ++-- .../6559d86fe1b8947954b9178d.md | 16 +-- .../6559da1b7d75f088f5e6b89f.md | 14 +-- .../6559da93115de78dbbdc7ba3.md | 26 ++-- .../6566195b0a021bb660b2b4b1.md | 27 +++-- .../65661b72d6745ebec6a96923.md | 56 +++++---- .../6567722f53ad97d7ea6bb082.md | 10 +- .../65774ae7c3eee66fe79b9459.md | 10 +- .../657891ab9c1903f4e55433ba.md | 16 +-- .../65789506b30453080f77470c.md | 6 +- .../6578b13757611e2825beb8a5.md | 24 ++-- .../6578b57361f2f132a02e2a18.md | 14 +-- .../65796fac81f983127558f3f4.md | 2 +- .../6579717f0920131304286804.md | 10 +- .../65797670e0c0d016f17e7660.md | 10 +- .../6579ca0923cfa7162089d2f0.md | 12 +- .../6579cbab9825b8170974c69a.md | 17 +-- .../6579cd5f6dd62c189e53ddbb.md | 18 ++- .../6579dd49fa8a8e1fd06b85a9.md | 12 +- .../65affe602a2a828b0382a058.md | 70 +++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ .../6557709b0aee699a6a00528c.md | 2 +- .../6557712d77ce2d9bd7e63afd.md | 2 +- .../6557716aadbd2d9c42c0e69a.md | 2 +- .../655771d889132f9ccd341060.md | 2 +- .../65577236b056379d5dbc7000.md | 2 +- .../655773b0591c5f9f4045883e.md | 2 +- .../655773f8b8b5db9fc6d0ae76.md | 2 +- .../6557743527cb92a06417ea97.md | 2 +- .../6557746aad2844a0cd864e12.md | 2 +- .../655774955b097ea14897db12.md | 2 +- .../655774d01daeeaa1978b99d5.md | 2 +- .../655775221059f5a20493d5d7.md | 2 +- .../655776db1eeae0a620e42a0d.md | 2 +- .../655777060d8ddea6741be1b1.md | 2 +- .../65577739f57ecca6c39bb4e9.md | 2 +- .../65577791ad8c26a7705e2919.md | 2 +- .../65577a17564ce8a8e06c1460.md | 2 +- .../65578c17d54dfab65cd54b95.md | 2 +- .../65578c74607d40b6d8c4757f.md | 2 +- .../65578cb031cd93b77a285db2.md | 2 +- .../65578cee7f2cb8b80127cce2.md | 2 +- .../65578d0f6c78a0b868a43b9c.md | 2 +- .../65578d4fc3afc3b8f554c882.md | 2 +- .../65578f895f2a65ba7a916804.md | 2 +- .../65578fcf00322dbad5dee05b.md | 2 +- .../655790d113d14dbb727eaf41.md | 2 +- .../6557910b0ebaeebc18209e90.md | 2 +- .../6557913b8fe5c0bc834c9f4f.md | 2 +- .../655791847db8a9bd0b685f40.md | 2 +- .../655791ae44c182bd92f31caa.md | 2 +- .../655791e6cf5e03be3de73451.md | 2 +- .../65579228c669fcbebffd01d5.md | 2 +- .../6557924d47c325bf27afbe51.md | 2 +- .../6557927ad11e58bf8c794b25.md | 2 +- .../6559d70c5161b16ff1d6530d.md | 2 +- .../6559d86fe1b8947954b9178d.md | 2 +- .../6559da1b7d75f088f5e6b89f.md | 2 +- .../6559da93115de78dbbdc7ba3.md | 2 +- .../6566195b0a021bb660b2b4b1.md | 2 +- .../65661b72d6745ebec6a96923.md | 2 +- .../6567722f53ad97d7ea6bb082.md | 2 +- .../65774ae7c3eee66fe79b9459.md | 2 +- .../657891ab9c1903f4e55433ba.md | 2 +- .../6579cbab9825b8170974c69a.md | 2 +- .../6579cd5f6dd62c189e53ddbb.md | 2 +- .../6579dd49fa8a8e1fd06b85a9.md | 2 +- .../65affe602a2a828b0382a058.md | 75 ++++++++++++ .../65b7cd2b7bd9a684ccf1dc16.md | 57 +++++++++ .../65b7cf140d34058d7ea8935f.md | 38 ++++++ .../65b7d25992879698180e6a71.md | 38 ++++++ .../65b7d3319ebec69b983fb91b.md | 56 +++++++++ 635 files changed, 4800 insertions(+), 1569 deletions(-) create mode 100644 curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md create mode 100644 curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md create mode 100644 curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md create mode 100644 curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md create mode 100644 curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md create mode 100644 curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md diff --git a/curriculum/challenges/_meta/learn-algorithm-design-by-building-a-shortest-path-algorithm/meta.json b/curriculum/challenges/_meta/learn-algorithm-design-by-building-a-shortest-path-algorithm/meta.json index a3bcfb91a5e..b03c9ea0745 100644 --- a/curriculum/challenges/_meta/learn-algorithm-design-by-building-a-shortest-path-algorithm/meta.json +++ b/curriculum/challenges/_meta/learn-algorithm-design-by-building-a-shortest-path-algorithm/meta.json @@ -43,188 +43,208 @@ "title": "Step 8" }, { - "id": "6579cbab9825b8170974c69a", + "id": "65b7cd2b7bd9a684ccf1dc16", "title": "Step 9" }, { - "id": "6579cd5f6dd62c189e53ddbb", + "id": "65b7cf140d34058d7ea8935f", "title": "Step 10" }, { - "id": "6579dd49fa8a8e1fd06b85a9", + "id": "65b7d25992879698180e6a71", "title": "Step 11" }, { - "id": "6557709b0aee699a6a00528c", + "id": "65b7d3319ebec69b983fb91b", "title": "Step 12" }, { - "id": "6557712d77ce2d9bd7e63afd", + "id": "6579cbab9825b8170974c69a", "title": "Step 13" }, { - "id": "6557716aadbd2d9c42c0e69a", + "id": "6579cd5f6dd62c189e53ddbb", "title": "Step 14" }, { - "id": "655771d889132f9ccd341060", + "id": "6579dd49fa8a8e1fd06b85a9", "title": "Step 15" }, { - "id": "6566195b0a021bb660b2b4b1", + "id": "6557709b0aee699a6a00528c", "title": "Step 16" }, { - "id": "65661b72d6745ebec6a96923", + "id": "65affe602a2a828b0382a058", "title": "Step 17" }, { - "id": "65577236b056379d5dbc7000", + "id": "6557712d77ce2d9bd7e63afd", "title": "Step 18" }, { - "id": "655773b0591c5f9f4045883e", + "id": "6557716aadbd2d9c42c0e69a", "title": "Step 19" }, { - "id": "655773f8b8b5db9fc6d0ae76", + "id": "655771d889132f9ccd341060", "title": "Step 20" }, { - "id": "6557743527cb92a06417ea97", + "id": "6566195b0a021bb660b2b4b1", "title": "Step 21" }, { - "id": "6557746aad2844a0cd864e12", + "id": "65661b72d6745ebec6a96923", "title": "Step 22" }, { - "id": "655774955b097ea14897db12", + "id": "65577236b056379d5dbc7000", "title": "Step 23" }, { - "id": "655774d01daeeaa1978b99d5", + "id": "655773b0591c5f9f4045883e", "title": "Step 24" }, { - "id": "655775221059f5a20493d5d7", + "id": "655773f8b8b5db9fc6d0ae76", "title": "Step 25" }, { - "id": "655776db1eeae0a620e42a0d", + "id": "6557743527cb92a06417ea97", "title": "Step 26" }, { - "id": "655777060d8ddea6741be1b1", + "id": "6557746aad2844a0cd864e12", "title": "Step 27" }, { - "id": "65577739f57ecca6c39bb4e9", + "id": "655774955b097ea14897db12", "title": "Step 28" }, { - "id": "65577791ad8c26a7705e2919", + "id": "655774d01daeeaa1978b99d5", "title": "Step 29" }, { - "id": "65577a17564ce8a8e06c1460", + "id": "655775221059f5a20493d5d7", "title": "Step 30" }, { - "id": "65578c17d54dfab65cd54b95", + "id": "655776db1eeae0a620e42a0d", "title": "Step 31" }, { - "id": "65578c74607d40b6d8c4757f", + "id": "655777060d8ddea6741be1b1", "title": "Step 32" }, { - "id": "65578cb031cd93b77a285db2", + "id": "65577739f57ecca6c39bb4e9", "title": "Step 33" }, { - "id": "65578cee7f2cb8b80127cce2", + "id": "65577791ad8c26a7705e2919", "title": "Step 34" }, { - "id": "65578d0f6c78a0b868a43b9c", + "id": "65577a17564ce8a8e06c1460", "title": "Step 35" }, { - "id": "65578d4fc3afc3b8f554c882", + "id": "65578c17d54dfab65cd54b95", "title": "Step 36" }, { - "id": "65578f895f2a65ba7a916804", + "id": "65578c74607d40b6d8c4757f", "title": "Step 37" }, { - "id": "65578fcf00322dbad5dee05b", + "id": "65578cb031cd93b77a285db2", "title": "Step 38" }, { - "id": "657891ab9c1903f4e55433ba", + "id": "65578cee7f2cb8b80127cce2", "title": "Step 39" }, { - "id": "655790d113d14dbb727eaf41", + "id": "65578d0f6c78a0b868a43b9c", "title": "Step 40" }, { - "id": "6557910b0ebaeebc18209e90", + "id": "65578d4fc3afc3b8f554c882", "title": "Step 41" }, { - "id": "6557913b8fe5c0bc834c9f4f", + "id": "65578f895f2a65ba7a916804", "title": "Step 42" }, { - "id": "655791847db8a9bd0b685f40", + "id": "65578fcf00322dbad5dee05b", "title": "Step 43" }, { - "id": "655791ae44c182bd92f31caa", + "id": "657891ab9c1903f4e55433ba", "title": "Step 44" }, { - "id": "655791e6cf5e03be3de73451", + "id": "655790d113d14dbb727eaf41", "title": "Step 45" }, { - "id": "6567722f53ad97d7ea6bb082", + "id": "6557910b0ebaeebc18209e90", "title": "Step 46" }, { - "id": "65579228c669fcbebffd01d5", + "id": "6557913b8fe5c0bc834c9f4f", "title": "Step 47" }, { - "id": "6557924d47c325bf27afbe51", + "id": "655791847db8a9bd0b685f40", "title": "Step 48" }, { - "id": "6559d70c5161b16ff1d6530d", + "id": "655791ae44c182bd92f31caa", "title": "Step 49" }, { - "id": "6557927ad11e58bf8c794b25", + "id": "655791e6cf5e03be3de73451", "title": "Step 50" }, { - "id": "6559d86fe1b8947954b9178d", + "id": "6567722f53ad97d7ea6bb082", "title": "Step 51" }, { - "id": "6559da1b7d75f088f5e6b89f", + "id": "65579228c669fcbebffd01d5", "title": "Step 52" }, { - "id": "65774ae7c3eee66fe79b9459", + "id": "6557924d47c325bf27afbe51", "title": "Step 53" }, { - "id": "6559da93115de78dbbdc7ba3", + "id": "6559d70c5161b16ff1d6530d", "title": "Step 54" + }, + { + "id": "6557927ad11e58bf8c794b25", + "title": "Step 55" + }, + { + "id": "6559d86fe1b8947954b9178d", + "title": "Step 56" + }, + { + "id": "6559da1b7d75f088f5e6b89f", + "title": "Step 57" + }, + { + "id": "65774ae7c3eee66fe79b9459", + "title": "Step 58" + }, + { + "id": "6559da93115de78dbbdc7ba3", + "title": "Step 59" } ], "helpCategory": "Python" diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index f6de3c5e1ec..2605f0a0fd1 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: الخطوة 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index 3d4376755ce..470b800f6bd 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: الخطوة 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 4af542bab3d..c67cd0a2b07 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: الخطوة 14 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 5a8c6bcacb8..738c3580fe0 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: الخطوة 15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index f192cb735b9..1ef83125c3f 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: الخطوة 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index 4f679f7ed36..b477f0d06a3 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: الخطوة 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index 2b3f17fe0a0..7edbb977b0a 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: الخطوة 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index 6f7d9fd9951..570cfed0888 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: الخطوة 21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 4825ad568e8..cdf4a232244 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: الخطوة 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index 155a9330cbb..63d4f8f56e5 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: الخطوة 23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index a87aa32e984..99f2c6b8264 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: الخطوة 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index 1217aa09473..9b8d225cdaa 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: الخطوة 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index a3f03835ef0..c930a727e8a 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: الخطوة 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index 84d96f12a28..0ece304fcad 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: الخطوة 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index 384d50a736a..a75d2295742 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: الخطوة 28 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index 79a99704f8d..acb96d970ba 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: الخطوة 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index 5e147fff423..8665815300a 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: الخطوة 30 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index 2eb8b43ec70..0910bf0f4ed 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: الخطوة 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 7e007798f78..eeef6d58aa8 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: الخطوة 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index f890650413b..237f0a50e3c 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: الخطوة 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index f10afb5a651..ebcc3a7ae9d 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: الخطوة 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index 0f183eb2dce..aa69c531710 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: الخطوة 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index 6c9ab85f749..ec47538f0ce 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: الخطوة 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index ee362ba0dac..0c7ff2698a8 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: الخطوة 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index 222ba8a7429..4e76028011a 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: الخطوة 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index a6902466f59..68dd75433b9 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: الخطوة 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index f850a535fe9..7b9ae6b7fe1 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: الخطوة 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index 731d8da7492..539c92c045e 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: الخطوة 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index 3c262f8c1b0..74b059d6fa0 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: الخطوة 43 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index 4bb3999b1a1..3230f622381 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: الخطوة 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index fa71ac6fb99..a36d5a28fc1 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: الخطوة 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index 4f5118a6214..bc6593d78d9 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: الخطوة 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index ed56b786191..20e64527f2d 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: الخطوة 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index 6985e5dfd70..243034a1df6 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: الخطوة 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 49bdf2cb1f7..7cf023ff934 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: الخطوة 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index a6b6f176351..3165d7ad4ec 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: الخطوة 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index b30a2f57e86..8eb4e785c32 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: الخطوة 52 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index fff8e9c5f51..e7aaaee1c18 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: الخطوة 54 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index 14b99cc9f6a..c0154e64d9a 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: الخطوة 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index e887aefc206..6db0aa7f7ab 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: الخطوة 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index 3ada7f7ce24..23ef82321d5 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: الخطوة 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 6a674f3159d..53fe6963754 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: الخطوة 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index e6fa11e67e4..31cbac4fef5 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: الخطوة 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 93a81b046d9..a8f87781102 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: الخطوة 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index 43f182b9bbe..30ef97860f7 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: الخطوة 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index 9dc64d9a818..fd31f6527ea 100644 --- a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: الخطوة 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/arabic/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 79fc2daa522..05f7732146b 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: 步驟 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index 48e351bccab..2a12a1bd863 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: 步驟 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 25e45427669..306b16be5a1 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: 第 14 步 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 77e32aead7d..ce9ced84aa0 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: 步驟15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 3873d9643c7..8bbe3ebb491 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: 步驟 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index 70612d5d2d7..871790f17f1 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: 步驟 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index 674a7ac1cf4..63e3c1144a2 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: 步驟 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index 947d11ba80f..288d06ea16b 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: 步驟21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 4e983158a0d..d679325118a 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: 步驟 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index b51285ea801..baaf80db203 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: 步驟-23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index 4b1222f8780..3a938d2731d 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: 步驟 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index 3f5a91558cf..8a2bc06cb60 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: 步驟 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index af1161e5c42..2bc24dc97f3 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: 步驟 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index 531906e925f..588ba17a4f7 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: 步驟 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index cdfe8d33289..6e2482146d0 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: 第 28 步 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index 5e8a976c1e4..12525a217c3 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: 步驟 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index 0093cc980fa..9186fcb51ed 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: 第 30 步 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index d6d0aee0ecc..4c3319839f8 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: 步驟 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 75b3dea97b0..d061e575a68 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: 步驟 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index 9ed60e5c411..11e3fe91cb5 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: 步驟 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index e4aa34937db..5f1d16fdb39 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: 步驟 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index 4f5bf7b5817..f3814bad12d 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: 步驟 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index 8cc5bf0f859..7bec26bc95b 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: 步驟 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index 81023e24463..4bd216b184c 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: 步驟 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index 2ce2ffc74be..70b3aea7ba1 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: 步驟 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index b641837d747..8a2c06337d6 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: 步驟 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index f3ff610bd1e..e6c476b6e54 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: 步驟 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index ca316093bcb..82b93bb9ec5 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: 步驟 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index 6be42c7d3d6..dd59514d3b7 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: 第 43 步 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index b9e5e540c4e..fdacb4b43f3 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: 步驟 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index 4798ad169b8..804887bc23a 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: 步驟 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index d0a401cde1a..3ed627e90ee 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: 步驟 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index 189edee52ae..02bc4af9044 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: 步驟 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index 64a2288eccf..c2d3439a7e5 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: 步驟 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index b5fb8a095d5..ff96b3c578e 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: 步驟 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index c832fe6e758..68fdd3ca496 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: 步驟 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index 301d1234771..cbfd78d5268 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: 第 52 步 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index f7f14aa6b89..b8015aa5fcc 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: 第 54 步 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index d1793fe2f04..a55879ce755 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: 步驟 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index fa3b90b95ea..519b3e0cb39 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: Step 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index 098086a4055..1e71fb49a60 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: 步驟 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 5b9e053a261..608905f8ad7 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: 步驟 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index 3cc0e942947..424b1b69100 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: 步驟 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 414f9cbb516..011990277ca 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: 步驟 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index 2cdd563bf1f..a5585df216b 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: 步驟 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index 6b4d96e0e85..78727396177 100644 --- a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: 步驟 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/chinese-traditional/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index ce69e929437..c27ac9bf380 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: 步骤 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index b4c35de72bf..f00fe2f760f 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: 步骤 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 25e45427669..306b16be5a1 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: 第 14 步 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 9c8315b0f30..ea1e7f1ad7b 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: 步骤15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 528f5eb45b7..ee562d1f17b 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: 步骤 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index f8fe11a2f60..06738a2857c 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: 步骤 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index 56ac84e33b3..a0a2bcec51e 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: 步骤 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index 4f89298edf2..d8b28870b7b 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: 步骤21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 5a6eb4f9cb6..2f260dd5bbe 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: 步骤 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index ac4a695093a..02fcd1b3d44 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: 步骤-23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index 02219953ec6..bd87b1f32de 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: 步骤 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index d8ee371fc68..5de1da95aff 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: 步骤 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 5e95115a02e..b59f2b16bb1 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: 步骤 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index 48f4b9ffaad..326aa86af50 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: 步骤 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index cdfe8d33289..6e2482146d0 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: 第 28 步 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index 72b1db801f1..820a928e2b7 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: 步骤 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index 0093cc980fa..9186fcb51ed 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: 第 30 步 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index 49c7223d64d..aa0a6a8cb6a 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: 步骤 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index e804f8a368b..6a746d3aded 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: 步骤 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index 2472f62a5d6..6b1d63e9067 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: 步骤 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index ba7ff57fd4e..94a7c07c049 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: 步骤 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index 6b4295bc73e..987101eb719 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: 步骤 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index 959d2665285..605b25a6bb3 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: 步骤 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index 716e08c698e..205225161b1 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: 步骤 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index 5037eee5513..ed6f3058315 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: 步骤 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index e9af5bb9d97..cff337d2d74 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: 步骤 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index 9845425b5fc..6a20c6cdf5a 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: 步骤 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index 7bea8608b2e..03358b2f3c1 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: 步骤 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index 6be42c7d3d6..dd59514d3b7 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: 第 43 步 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index c866bc78f86..4d007353e95 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: 步骤 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index 05366dee17f..b926ecb9689 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: 步骤 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index 6539dd9e613..c332b3af8d9 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: 步骤 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index 4a2abfe140c..798cb9a5479 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: 步骤 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index fa0b34785b7..2e46813b630 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: 步骤 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 3aa721d8085..8c5c4310623 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: 步骤 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index 427679cc8da..3af5591d9e3 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: 步骤 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index 301d1234771..cbfd78d5268 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: 第 52 步 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index f7f14aa6b89..b8015aa5fcc 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: 第 54 步 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index ad8efc85b1d..b2f4f6358c5 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: 步骤 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index fa3b90b95ea..519b3e0cb39 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: Step 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index e79e64fbf26..3edfe049039 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: 步骤 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 50f8a9a3381..e0fb662216f 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: 步骤 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index f962e6d34f4..9226f576cd6 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: 步骤 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 84a9d4ee3a4..ed0e6259af5 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: 步骤 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index f8d6be8d99e..0ed81e06181 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: 步骤 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index ccf6c87e326..5a1579f7bb6 100644 --- a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: 步骤 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/chinese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md index 6b0cf8c63de..08d8aceb982 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md @@ -16,20 +16,11 @@ my_dict = { } ``` -Add a new key-value pair to your dictionary. Use the string `species` as the key, and the string `guinea pig` as the value. +Add a new key-value pair to your dictionary. Use the string `'species'` as the key, and the string `'guinea pig'` as the value. # --hints-- -You should add a new key-value pair to your `copper` dictionary. - -```js -({ test: () => assert(runPython(` - len(copper) == 1 - `)) -}) -``` - -You should have a `species` key with the value `guinea pig` inside your `copper` dictionary. +You should have a `'species'` key with the value `'guinea pig'` inside your `copper` dictionary. ```js ({ test: () => assert(runPython(` @@ -38,6 +29,15 @@ You should have a `species` key with the value `guinea pig` inside your `copper` }) ``` +Your `copper` dictionary should have a single key-value pair. + +```js +({ test: () => assert(runPython(` + len(copper) == 1 + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 69edb77063f..c10f2283d5a 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -1,17 +1,19 @@ --- id: 6557709b0aee699a6a00528c -title: Step 12 +title: Step 16 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- -Now, replace the existent keys with the strings `A` and `B` — one for each node. Then, replace each value with the string representing the node connected to the key. +For example, a graph can be used to represent two points in the space, `A` and `B`, connected by a path. A graph like this will be made of two nodes connected by an edge. + +Replace the existent `'species'` key with the strings `'A'`. Then, replace the correspondent value with the string `'B'` to represent the connection between the `'A'` and `'B'` nodes. # --hints-- -Your dictionary should have an `A` key. +Your dictionary should have an `'A'` key. ```js ({ test: () => assert(runPython(` @@ -20,7 +22,7 @@ Your dictionary should have an `A` key. }) ``` -Your `A` key should have `B` as the value. +Your `'A'` key should have `'B'` as the value. ```js ({ test: () => assert(runPython(` @@ -29,24 +31,6 @@ Your `A` key should have `B` as the value. }) ``` -Your dictionary should have an `B` key. - -```js -({ test: () => assert(runPython(` - "B" in my_graph - `)) -}) -``` - -Your `B` key should have `A` as the value. - -```js -({ test: () => assert(runPython(` - my_graph["B"] == "A" - `)) -}) -``` - Your dictionary should have two keys. ```js diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index aad91960c07..7215d816254 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -1,19 +1,21 @@ --- id: 6557712d77ce2d9bd7e63afd -title: Step 13 +title: Step 18 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- Add another node connected to `B` to your graph and call it `C`. -Modify your existing dictionary to represent this arrangement. Use a list to represent the multiple connections of your `B` node. +Modify your existing dictionary to represent this arrangement: add another key `'C'` to `my_graph` and give it the value of the string `'B'`. + +Also, change the value of the existing `'B'` key into the list `['A', 'C']` to represent the multiple connections of your `'B'` node. # --hints-- -Your dictionary should have 3 keys — `A`, `B`, and `C`. +Your dictionary should have 3 keys — `'A'`, `'B'`, and `'C'`. ```js ({ test: () => assert(runPython(` @@ -23,7 +25,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -`my_graph["A"]` should have the `B` node as the value. +The value of `my_graph['A']` should be the string `'B'`. ```js ({ test: () => assert(runPython(` @@ -32,7 +34,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -`my_graph["B"]` should be a list. +`my_graph['B']` should be a list. ```js ({ test: () => assert(runPython(` @@ -41,7 +43,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -The value of `my_graph["B"]` should be a list containing the other two nodes. +The value of `my_graph['B']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` @@ -50,7 +52,7 @@ The value of `my_graph["B"]` should be a list containing the other two nodes. }) ``` -The value of `my_graph["C"]` should be the connected node. +The value of `my_graph['C']` should be the string `'B'`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 5d34b32984c..214acd525c5 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -1,17 +1,19 @@ --- id: 6557716aadbd2d9c42c0e69a -title: Step 14 +title: Step 19 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- -Add one last node, `D`, which is connected with `A` and `C`. Modify your dictionary to represent this structure. Again, use a list to represent multiple connections. +Add one last node, `'D'`, which is connected with `'A'` and `'C'`. + +Modify your dictionary to represent this structure. Again, use a list to represent multiple connections. # --hints-- -Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. +Your dictionary should have 4 keys called `'A'`, `'B'`, `'C'`, and `'D'`. ```js ({ test: () => assert(runPython(` @@ -21,7 +23,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["A"]` should be a list. +`my_graph['A']` should be a list. ```js ({ test: () => assert(runPython(` @@ -30,7 +32,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["A"]` should be a list containing `B` and `D`. +`my_graph['A']` should be a list containing `'B'` and `'D'`. ```js ({ test: () => assert(runPython(` @@ -39,7 +41,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["B"]` should be a list. +`my_graph['B']` should be a list. ```js ({ test: () => assert(runPython(` @@ -48,7 +50,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["B"]` should be a list containing `A` and `C`. +`my_graph['B']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` @@ -57,7 +59,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["C"]` should be a list. +`my_graph['C']` should be a list. ```js ({ test: () => assert(runPython(` @@ -66,7 +68,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["C"]` should be a list containing `B` and `D`. +`my_graph['C']` should be a list containing `'B'` and `'D'`. ```js ({ test: () => assert(runPython(` @@ -75,7 +77,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["D"]` should be a list. +`my_graph['D']` should be a list. ```js ({ test: () => assert(runPython(` @@ -84,7 +86,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["D"]` should be a list containing `A` and `C`. +`my_graph['D']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 0445ec0b74f..42b1e248037 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -1,50 +1,23 @@ --- id: 655771d889132f9ccd341060 -title: Step 15 +title: Step 20 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- A graph is called a *weighted* graph when its edges are associated with weights, representing a distance, time or other quantitative value. -In your case, these weights will be the distances between each node, or point in space. -To represent a weighted graph you can modify your dictionary, using a list of tuples for each value. +In your case, these weights will be the distances between each node, or point in space. To represent a weighted graph you can modify your dictionary, using a list of tuples for each value. The first element in the tuple will be the connected node, and the second element will be an integer number indicating the distance. -Modify `my_graph["A"]` into a list of tuples, considering the following distances: - -| Edge | Weight | -|------|--------| -| A-B | 3 | -| B-C | 4 | -| C-D | 7 | -| D-A | 1 | +Modify `my_graph['A']` into a list of tuples, considering that the `A-B` distance is `3` and the `A-D` distance is `1`. # --hints-- -Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. - -```js -({ test: () => assert(runPython(` - key_list = ["A", "B", "C", "D"] - len(my_graph) == 4 and all(key in my_graph for key in key_list) - `)) -}) -``` - -`my_graph["A"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["A"]) is list and all(type(i) is tuple for i in my_graph["A"]) - `)) -}) -``` - -`my_graph["A"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph["A"]` should be a list containing the tuples `('B', 3)` and `('D', 1)`. ```js ({ test: () => assert(runPython(` @@ -54,6 +27,16 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 6c87fb04466..c25039adc3f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -1,19 +1,19 @@ --- id: 65577236b056379d5dbc7000 -title: Step 18 +title: Step 23 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- Now you are going to start developing the algorithm to calculate the shortest path between each node in your new graph. -Declare an empty function called `shortest_path` and don't forget the `pass` keyword. +Declare an empty function called `shortest_path`. Use the `pass` keyword to fill the function body. # --hints-- -You should have a `shortest_path` function. +You should define a function named `shortest_path`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index d36a0b80c00..702a4b5e6ba 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -1,8 +1,8 @@ --- id: 655773b0591c5f9f4045883e -title: Step 19 +title: Step 24 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- @@ -13,7 +13,7 @@ For that your function needs two parameters: `graph`, and `start`. Add them to y # --hints-- -Your function should accept `graph` and `start` as the parameters, in this order. +Your function should take `graph` and `start` as the parameters, in this order. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index f6578234e43..f2542698e74 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -1,8 +1,8 @@ --- id: 655773f8b8b5db9fc6d0ae76 -title: Step 20 +title: Step 25 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- @@ -13,28 +13,16 @@ Now, replace the `pass` keyword with a variable named `unvisited` and assign it # --hints-- -You should have a variable called `unvisited`. +You should have a variable called `unvisited` inside the `shortest_path` function. ```js -({ test: () => - { - const shortest_path = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest_path; - assert(function_body.match(/unvisited\s*=/)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").has_variable("unvisited")`)) }) ``` -Your `unvisited` variable should be an empty list. +You should assign an empty list to your `unvisited` variable. Remember to delete `pass`. ```js -({ test: () => - { - const shortest_path = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest_path; - assert(function_body.match(/unvisited\s*=\s*\[\s*\]/)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_body().is_equivalent("unvisited = []")`)) }) ``` # --seed-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index 535c3dd38d1..e8883fb7c61 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -1,13 +1,13 @@ --- id: 6557743527cb92a06417ea97 -title: Step 21 +title: Step 26 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- -Create a `for` loop to iterate over your graph, and append each node to the `unvisited` list. +Create a `for` loop to iterate over your graph, and use the `.append()` method to add each node to the end of the `unvisited` list. # --hints-- @@ -15,9 +15,9 @@ You should create a `for` loop to iterate over `graph` inside the `shortest_path ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for\s+(\w+)\s+in\s+graph\s*:/m)); + const commentless_code = __helpers.python.removeComments(code); + const {function_body} = __helpers.python.getDef(commentless_code, "shortest_path"); + assert(function_body.match(/^\s*for\s+\w+\s+in\s+graph\s*:/m)); } }) ``` @@ -26,9 +26,12 @@ You should append each node to `unvisited` inside your `for` loop. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for\s+(\w+)\s+in\s+graph\s*:\s*^\1\1unvisited\.append\s*\(\s*\2\s*\)/m)); + const commentless_code = __helpers.python.removeComments(code); + const block_regex = /for\s+(\w+)\s+in\s+graph\s*/; + const {block_body} = __helpers.python.getBlock(commentless_code, block_regex); + const loop_condition = commentless_code.match(block_regex); + const regex = new RegExp(`^\\s+unvisited\\.append\\s*\\(\\s*${loop_condition[1]}\\s*\\)`, "m"); + assert(block_body.match(regex)); } }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 85683677008..bc7c109ce87 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -1,8 +1,8 @@ --- id: 6557746aad2844a0cd864e12 -title: Step 22 +title: Step 27 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- @@ -13,7 +13,7 @@ Before your `for` loop, create a new variable named `distances` and assign it an # --hints-- -You should have a `distances` variable. +You should have a variable named `distances`. ```js ({ test: () => { diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index 30203fee2b4..20194065cc5 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -1,8 +1,8 @@ --- id: 655774955b097ea14897db12 -title: Step 23 +title: Step 28 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- @@ -17,9 +17,9 @@ You should create an `if` statement that executes when `node` is equal to `start ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1\1if\s+node\s*==\s*start\s*:/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /for\s+node\s+in\s+graph\s*/); + assert(block_body.match(/unvisited\.append\s*\(\s*node\s*\)\s*^\s+if\s+(node\s*==\s*start|start\s*==\s*node)\s*:/m)); } }) ``` @@ -28,9 +28,9 @@ Inside your new `if` statement you should assign `0` to the node in the `distanc ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1\1if\s+node\s*==\s*start\s*:\s*^\1\1\1distances\s*\[\s*node\s*\]\s*=\s*0/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+(node\s*==\s*start|start\s*==\s*node)\s*/m); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*0/m)); } }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index 904217952c5..b098e869e4d 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -1,15 +1,15 @@ --- id: 655774d01daeeaa1978b99d5 -title: Step 24 +title: Step 29 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- At the beginning, all the other nodes in the graph are considered to be at infinite distance from the source node, because the distance has not been determined yet. -Create an `else` clause and assign an infinite value to the node in the `distances` dictionary. For that, use the `float()` function with the string `inf` as argument to generate a floating point number representing the positive infinity. +Create an `else` clause and assign an infinite value to the node in the `distances` dictionary. For that, use the `float()` function with the string `'inf'` as argument to generate a floating point number representing the positive infinity. # --hints-- @@ -28,9 +28,9 @@ You should assign `float('inf')` to `distances[node]` inside your new `else` cla ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if.*:.*^\1else\s*:\s*^\1\s{4}distances\s*\[\s*node\s*\]\s*=\s*float\s*\(\s*("|')inf\2\s*\)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, "else"); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*float\s*\(\s*("|')inf\1\s*\)\s*$/)); } }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index f612f5496eb..2f29188731d 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -1,8 +1,8 @@ --- id: 655775221059f5a20493d5d7 -title: Step 25 +title: Step 30 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 1f04bd17df0..a06ef5cddc1 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -1,8 +1,8 @@ --- id: 655776db1eeae0a620e42a0d -title: Step 26 +title: Step 31 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index 7a1de345c83..f5f032edcd0 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -1,8 +1,8 @@ --- id: 655777060d8ddea6741be1b1 -title: Step 27 +title: Step 32 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index 86a0ca5884d..b695c39413b 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -1,8 +1,8 @@ --- id: 65577739f57ecca6c39bb4e9 -title: Step 28 +title: Step 33 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index 0aa94de8e5d..58bf73655a4 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -1,8 +1,8 @@ --- id: 65577791ad8c26a7705e2919 -title: Step 29 +title: Step 34 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- @@ -13,13 +13,15 @@ With a dictionary comprehension, you can create a dictionary starting from an ex {key: val for key in dict} ``` +In the example above, `val` is the value that `key` will have in the new dictionary, and `dict` is the existing dictionary. + You want to keep track of the paths between the starting node and each other node. After the `distances` variable, create a `paths` variable and assign it a dictionary with all the keys from `graph`. Assign an empty list to each key and use a dictionary comprehension to build your dictionary. # --hints-- -You should have a `paths` variable. +You should have a variable named `paths`. ```js ({ test: () => { @@ -34,8 +36,7 @@ Your `paths` variable should use the dictionary comprehension syntax to assign a ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; + const {function_body} = __helpers.python.getDef(code, "shortest_path"); assert(function_body.match(/^\s{4}paths\s*\=\s*\{\s*(\w+)\s*:\s*\[\s*\]\s+for\s+\1\s+in\s+graph\s*\}/m)); } }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index a668dc5dbe2..787dd058d2f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -1,8 +1,8 @@ --- id: 65577a17564ce8a8e06c1460 -title: Step 30 +title: Step 35 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- @@ -13,7 +13,9 @@ Dictionary comprehensions support conditional `if`/`else` syntax too: {key: val_1 if condition else val_2 for key in dict} ``` -Use a dictionary comprehension to create a dictionary based in `graph` and assign it to the `distances` variable. Give the key a value of zero if the node is equal to the starting node, and infinite otherwise. Use `float('inf')` to achieve the latter. +In the example above, `dict` is the existing dictionary. When `condition` evaluates to `True`, `key` will have the value `val_1` , otherwise `val_2`. + +Use a dictionary comprehension to create a dictionary based on `graph` and assign it to the `distances` variable. Give the key a value of zero if the node is equal to the starting node, and infinite otherwise. Use `float('inf')` to achieve the latter. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index 9fd60a4bd40..1f59bb3cac3 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -1,20 +1,20 @@ --- id: 65578c17d54dfab65cd54b95 -title: Step 31 +title: Step 36 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- Since the algorithm begins its assessment from the starting node, after creating the `paths` dictionary, you need to add the starting node to its own list in the `paths` dictionary. -Use the `append()` method to append `start` to the `paths[start]` list. +Use the `.append()` method to append `start` to the `paths[start]` list. # --hints-- -You should use the `append()` method to append `start` to `paths[start]`. +You should use the `.append()` method to append `start` to `paths[start]`. ```js ({ test: () => { diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 1faffdcf694..77bacd43df0 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -1,8 +1,8 @@ --- id: 65578c74607d40b6d8c4757f -title: Step 32 +title: Step 37 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index a9e24846667..93e13d14b83 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -1,8 +1,8 @@ --- id: 65578cb031cd93b77a285db2 -title: Step 33 +title: Step 38 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index 3d6c784589f..d3599b7f08c 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -1,8 +1,8 @@ --- id: 65578cee7f2cb8b80127cce2 -title: Step 34 +title: Step 39 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- @@ -15,9 +15,12 @@ You should have a `while` loop that executes while `unvisited` is not empty. Don ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1pass(?=\s*^\1print)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {function_body} = __helpers.python.getDef(commentless_code, "shortest_path"); + assert(function_body.match(/^\s+while\s+(unvisited|unvisited\s*!=\s*\[\s*\]|len\s*\(\s*unvisited\s*\)\s*(>|!=)\s*0)\s*:/m)); + const {block_body} = __helpers.python.getBlock(commentless_code, /while\s+(unvisited|unvisited\s*!=\s*\[\s*\]|len\s*\(\s*unvisited\s*\)\s*(>|!=)\s*0)\s*/); + assert(block_body.match(/\s+pass/)) + } }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index f661515e703..2896691a3cb 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -1,8 +1,8 @@ --- id: 65578d0f6c78a0b868a43b9c -title: Step 35 +title: Step 40 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- @@ -16,23 +16,13 @@ Remove `pass`, then create a variable called `current` and assign it `min(unvisi You should create a `current` variable in your `while` loop. ```js -({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1current\s*=/ms)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_whiles()[0].has_variable("current")`)) }) ``` -You should assign `min(unvisited)` to your `current` variable. +You should assign `min(unvisited)` to your `current` variable. Remember to delete `pass`. ```js -({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1current\s*=\s*min\s*\(\s*unvisited\s*\)/ms)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_whiles()[0].find_bodies()[0].is_equivalent("current = min(unvisited)")`)) }) ``` # --seed-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index ce9dddcf7d5..05bc3042843 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -1,8 +1,8 @@ --- id: 65578d4fc3afc3b8f554c882 -title: Step 36 +title: Step 41 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index 47ddef981b0..3aac660e0ba 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -1,13 +1,13 @@ --- id: 65578f895f2a65ba7a916804 -title: Step 37 +title: Step 42 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- -After the `current` variable assignment, create a `for` loop to iterate over the tuples in the `graph[current]` list. You will need two iterating variables for that. +After the `current` variable assignment, create a `for` loop to iterate over the tuples in the `graph[current]` list. You will need two iterating variables for that. Remember to use `pass` to fill the loop body. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index 915da4bb733..aff816846ec 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -1,8 +1,8 @@ --- id: 65578fcf00322dbad5dee05b -title: Step 38 +title: Step 43 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index 6e66cb1668c..d2fa44585df 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -1,15 +1,15 @@ --- id: 655790d113d14dbb727eaf41 -title: Step 40 +title: Step 45 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- Once the distance to a node is set inside the `distances` dictionary, you need to keep track of the path to that node, too. If the distance for the node in the processed tuple has been updated, the last item in its path is the node itself. -Inside your conditional, nest another `if` statement that triggers when the last element of `paths[node]` is equal to `node`. +Inside your conditional, nest another `if` statement that triggers when the last element of `paths[node]` is equal to `node`. Use `pass` to fill the `if` statement body. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index 0f77df68976..71e88436f71 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -1,8 +1,8 @@ --- id: 6557910b0ebaeebc18209e90 -title: Step 41 +title: Step 46 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index cca9cf70aab..18b7a83beee 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -1,28 +1,37 @@ --- id: 6557913b8fe5c0bc834c9f4f -title: Step 42 +title: Step 47 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- -Next, create an `else` statement and use the `extend()` function to add the current node path to the neighbor node path. +The `.extend()` method, allows you to add elements from an iterable to the end of a list: + +```py +my_list = ['larch', 'birch'] +tree_list = ['fir', 'redwood', 'pine'] +my_list.extend(tree_list) +print(my_list) # Output: ['larch', 'birch', 'fir', 'redwood', 'pine'] +``` + +Create an `else` clause and use the `.extend()` method to add the current node path to the neighbor node path. # --hints-- -You should create an `else` statement after your nested `if`. +You should create an `else` clause after your nested `if` statement. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if\s+paths\s*\[\s*node\s*\]\s*\[\s*-\s*1\s*\]\s*==\s*node\s*:\s*^\1(\s{4})paths\s*\[\s*node\s*\]\s*=\s*paths\s*\[\s*current\s*\]\s*^\1else\s*:/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*/); + assert(block_body.match(/^\s+else\s*:/m)); } }) ``` -You should call `extend()` on the neighbour node path passing the current node path as the argument. +You should have `paths[node].extend(paths[current])` in your `else` clause. ```js ({ test: () => { diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index a66b958aa29..078f3aa7bef 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -1,17 +1,17 @@ --- id: 655791847db8a9bd0b685f40 -title: Step 43 +title: Step 48 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- -Finally, outside the nested conditionals, append the neighbor node to its path. +Finally, below the `else` clause, append the neighbor node to its path. # --hints-- -You should append `node` to `paths[node]` just after your `else` statement. +You should append `node` to `paths[node]` just after your `else` clause. ```js ({ test: () => { diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index 4988872c9ea..93aab637e14 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -1,23 +1,33 @@ --- id: 655791ae44c182bd92f31caa -title: Step 44 +title: Step 49 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- +The `.remove()` method removes from a list the first matching element that is passed as the argument: + +```py +my_list = ['larch', 1, True, 1] +my_list.remove(1) +print(my_list) # Output: ['larch', True, 1] +``` + Terminate the `while` loop by removing the current node from the `unvisited` list. Pay attention to the indentation. # --hints-- -You should use the `remove()` function to remove the current node from `unvisited` after your `for` loop. +You should use the `.remove()` method to remove the current node from `unvisited` after your `for` loop. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1unvisited\.remove\s*\(\s*current\s*\)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /while\s+unvisited/); + assert(block_body.match(/^\s+unvisited\.remove\s*\(\s*current\s*\)/m)); + const {block_body: for_body} = __helpers.python.getBlock(commentless_code, /for\s+node\s*,\s*distance\s+in\s+graph\s*\[\s*current\s*\]\s*/); + assert.notMatch(for_body, /^\s+unvisited\.remove\s*\(\s*current\s*\)/m); } }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index fd7452e3572..5d6f30ebda8 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -1,13 +1,13 @@ --- id: 655791e6cf5e03be3de73451 -title: Step 45 +title: Step 50 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- -If you try to uncomment your function call, it won't work. You have a couple of bugs to fix. The first one happens because in the nested `if` you are trying to access that might not exist in your `paths` dictionary. So, you need to be sure that `paths[node]` is not empty before accessing `paths[node][-1]`. +If you try to uncomment your function call, it won't work. You have a couple of bugs to fix. The first one happens because in the nested `if` you are trying to access an element that might not exist in your `paths[node]` list. So, you need to be sure that `paths[node]` is not empty before accessing `paths[node][-1]`. Add an additional condition to your nested `if` statement to ensure that `paths[node]` is non-empty before accessing `paths[node][-1]`. diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index e6cc432eb18..de0d71fe456 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -1,8 +1,8 @@ --- id: 65579228c669fcbebffd01d5 -title: Step 47 +title: Step 52 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- @@ -11,11 +11,17 @@ The other bug is subtle. When a shorter distance is found for a neighbor node, ` This means both variables point to the same list. Since lists are mutable, when you append the neighbor node to its path, both `paths[node]` and `paths[current]` are modified because they are the same list. This results in wrong paths, although the distances are correct. -Fix that bug by assigning a copy of `paths[current]` to the neighbor node path. Modify the existing assignment inside your `if` block. +You can fix that bug by assigning a copy of `paths[current]` to the neighbor node path. For that you can use the slice syntax: + +```py +my_list[:] +``` + +Where `my_list` is the list you want to copy. Modify the existing `paths[node] = paths[current]` assignment inside your `if` block by slicing `paths[current]`. # --hints-- -You should use the slice syntax to assign a copy of `paths[current]` to the neighbor node path. +You should assign `paths[current][:]` to the neighbor node path. ```js ({ test: () => assert.match(code, /^(\s*)if\s+paths\s*\[\s*node\s*\]\s+and\s+paths\s*\[\s*node\s*\]\s*\[\s*-\s*1\s*\]\s*==\s*node\s*:\s*^\1\s{4}paths\s*\[\s*node\s*\]\s*=\s*paths\s*\[\s*current\s*\]\s*\[\s*::?\s*\]/ms) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index 5e0dab4db4f..08f56f3a18b 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -1,8 +1,8 @@ --- id: 6557924d47c325bf27afbe51 -title: Step 48 +title: Step 53 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index cd0b292be74..ad534a1ed64 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -1,8 +1,8 @@ --- id: 6557927ad11e58bf8c794b25 -title: Step 50 +title: Step 55 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- @@ -11,7 +11,7 @@ Create a `for` loop to iterate over `targets_to_print` and print the following f # --hints-- -You should create a `for` loop to iterate over `targets_to_print`. Use `node` as iteration variable. +You should create a `for` loop to iterate over `targets_to_print`. Use `node` as the loop variable. ```js ({ test: () => { diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 757579fb649..5a17874324e 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -1,8 +1,8 @@ --- id: 6559d70c5161b16ff1d6530d -title: Step 49 +title: Step 54 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- @@ -37,7 +37,7 @@ You should create a variable called `targets_to_print` after your `while` loop. }) ``` -You should the ternary syntax to assign `[target]` when `target` is truthy, and `graph` otherwise to your `targets_to_print` variable. +You should use the ternary syntax to assign `[target]` when `target` is truthy, and `graph` otherwise to your `targets_to_print` variable. ```js ({ test: () => { diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index 7f6054a003e..bebe295c52d 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -1,8 +1,8 @@ --- id: 6559d86fe1b8947954b9178d -title: Step 51 +title: Step 56 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index 66dc1fa7181..a6a85e17930 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -1,17 +1,17 @@ --- id: 6559da1b7d75f088f5e6b89f -title: Step 52 +title: Step 57 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- -Finally, at the very end of your function, return `distances` and `paths`. +Finally, at the very end of your function, return `distances, paths`. # --hints-- -You should return `distances` and `paths` at the bottom of your function. +You should return `distances, paths` at the bottom of your function. ```js ({ test: () => { diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index 66ed7f91e47..b1679096f82 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -1,13 +1,13 @@ --- id: 6559da93115de78dbbdc7ba3 -title: Step 54 +title: Step 59 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- -As a final step, modify your function call passing `F` as the third argument and check the output. +As a final step, modify your function call passing `'F'` as the third argument to print only the path from `A` to `F`. With that, the shortest path algorithm is complete. diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index f7f4f834e4d..11de998a29f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -1,26 +1,17 @@ --- id: 6566195b0a021bb660b2b4b1 -title: Step 16 +title: Step 21 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- -Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`. +Now modify `my_graph['B']` into a list of tuples, where the first element in the tuple is the connected node, and the second element is the distance. The `B-C` distance is `4`. # --hints-- -`my_graph["B"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["B"]) is list and all(type(i) is tuple for i in my_graph["B"]) - `)) -}) -``` - -`my_graph["B"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['B']` should be a list containing the tuples `('A', 3)` and `('C', 4)`. ```js ({ test: () => assert(runPython(` @@ -30,6 +21,16 @@ Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`. }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index fa3b90b95ea..cd4e33e8754 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -1,8 +1,8 @@ --- id: 65661b72d6745ebec6a96923 -title: Step 17 +title: Step 22 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- @@ -11,16 +11,7 @@ In the same way, modify the remaining two lists considering that the `C-D` dista # --hints-- -`my_graph["C"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["C"]) is list and all(type(i) is tuple for i in my_graph["C"]) - `)) -}) -``` - -`my_graph["C"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['C']` should be a list containing the tuples `('B', 4)` and `('D', 7)`. ```js ({ test: () => assert(runPython(` @@ -30,16 +21,7 @@ In the same way, modify the remaining two lists considering that the `C-D` dista }) ``` -`my_graph["D"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["D"]) is list and all(type(i) is tuple for i in my_graph["D"]) - `)) -}) -``` - -`my_graph["D"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['D']` should be a list containing the tuples `('A', 1)` and `('C', 7)`. ```js ({ test: () => assert(runPython(` @@ -49,6 +31,36 @@ In the same way, modify the remaining two lists considering that the `C-D` dista }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + +`my_graph['A']` should be a list containing the tuples `('B', 3)` and `('D', 1)`. + +```js +({ test: () => assert(runPython(` + tuples = [("B", 3), ("D", 1)] + len(my_graph["A"]) == 2 and all(t in my_graph["A"] for t in tuples) + `)) +}) +``` + +`my_graph['B']` should be a list containing the tuples `('A', 3)` and `('C', 4)`. + +```js +({ test: () => assert(runPython(` + tuples = [("A", 3), ("C", 4)] + len(my_graph["B"]) == 2 and all(t in my_graph["B"] for t in tuples) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index 74385cf9134..6ddd8da7a6f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -1,8 +1,8 @@ --- id: 6567722f53ad97d7ea6bb082 -title: Step 46 +title: Step 51 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 2a7982c2675..a5cae41c450 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -1,8 +1,8 @@ --- id: 65774ae7c3eee66fe79b9459 -title: Step 53 +title: Step 58 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index c82308e7d36..1612e2689fc 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -1,23 +1,25 @@ --- id: 657891ab9c1903f4e55433ba -title: Step 39 +title: Step 44 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- +When the condition of your new `if` is true, a shorter path to the neighbor node has been found. + Inside your new `if` block, delete `pass` and reassign the neighbor node distance to the sum of the neighbor node distance plus the distance of `current`. # --hints-- -You should assign `distance + distances[current]` to the neighbor node distance inside your new `if`. +You should assign `distance + distances[current]` to `distances[node]` inside your new `if`. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*:\s*^\1\s{4}distances\s*\[\s*node\s*\]\s*=\s*distance\s*\+\s*distances\s*\[\s*current\s*\]/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*/); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*distance\s*\+\s*distances\s*\[\s*current\s*\]/)); } }) ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md index 62db4d83c18..4124cd85e1a 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md @@ -10,9 +10,9 @@ dashedName: step-1 So far, you have already met different data types: - Immutable data types, such as integers, strings, tuples, and Booleans. -- Mutable data types, such as lists. +- Mutable data types, such as lists, and dictionaries. -A dictionary is a mutable data type and it is identified by a pair of curly braces, `{}`. +A dictionary is identified by a pair of curly braces, `{}`. Start by creating a variable called `copper` and assign it an empty dictionary using a pair of curly braces, in the same way you would create an empty list with a pair of square brackets. diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md index 0a6d148a90b..c9e787d4914 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md @@ -9,20 +9,11 @@ dashedName: step-3 Keys must be unique within a dictionary and they can be only immutable data types. This means you cannot use a list or another dictionary as keys. -Add another key `age` to your dictionary and give it the integer number `2` as value. +Add another key `'age'` to your dictionary and give it the integer number `2` as value. # --hints-- -You should add a new key-value pair to your `copper` dictionary. - -```js -({ test: () => assert(runPython(` - len(copper) == 2 - `)) -}) -``` - -You should have an `age` key with the value `2` just after `'species': 'guinea pig'`, inside your `copper` dictionary. Don't forget the comma. +You should have an `'age'` key with the value `2` just after `'species': 'guinea pig'`, inside your `copper` dictionary. Don't forget the comma. ```js ({ test: () => assert(runPython(` @@ -31,6 +22,15 @@ You should have an `age` key with the value `2` just after `'species': 'guinea p }) ``` +You should have two key-value pairs in your `copper` dictionary. + +```js +({ test: () => assert(runPython(` + len(copper) == 2 + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md index 4edd91c31c6..6319e57bf45 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md @@ -12,17 +12,17 @@ You can access the data stored in a dictionary through its keys: ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } my_dict['name'] # 'Michael' ``` -After your dictionary, follow the example above to access the `species` key of `copper` and print the result. +After your dictionary, follow the example above to access the `'species'` key of `copper` and print the result. # --hints-- -You should not modify your dictionary. +You should not modify the assignment of your dictionary. ```js ({ test: () => assert(runPython(` @@ -31,7 +31,7 @@ You should not modify your dictionary. }) ``` -You should use `copper['species']` to access the value of the `species` key. +You should use `copper['species']` to access the value of the `'species'` key. ```js ({ test: () => assert.match(code, /copper\s*\[\s*("|')species\1\s*\]/) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md index 93d57c495e8..04524a61fbc 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md @@ -12,13 +12,13 @@ To add a new key-value pair after declaring a dictionary, you can indicate the k ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } my_dict['country'] = 'Canada' ``` -Delete your `print()` call. Then, after declaring `copper`, add the key `food` to your dictionary and set its value to `hay`. +Delete your `print()` call. Then, after the `copper` declaration, add the key `'food'` to your dictionary and set its value to `'hay'`. # --hints-- @@ -28,13 +28,13 @@ You should not have `print(copper['age'])` in your code. ({ test: () => assert.notMatch(code, /^print\(\s*copper\s*\[\s*("|')age\1\s*\]\s*\)/m) }) ``` -You should add the key `food` to `copper` after declaring the dictionary. +You should add the key `'food'` to `copper` after declaring the dictionary. ```js ({ test: () => assert.match(code, /copper\s*\[\s*("|')food\1\s*\]/) }) ``` -You should set `copper['food']` to `hay` after declaring the dictionary. +You should set `copper['food']` to `'hay'` after declaring the dictionary. ```js ({ test: () => assert.match(code, /^copper\s*\[\s*("|')food\1\s*\]\s*=\s*("|')hay\2/m) }) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md index fcd115aa8ff..c5918f9cc3f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md @@ -14,7 +14,13 @@ Now, at the bottom of your code, print `copper`. You should print `copper` at the bottom of your code. ```js -assert.match(code, /print\s*\(\s*copper\s*\)/) +({ test: () => + { + const commentless_code = __helpers.python.removeComments(code); + assert.match(commentless_code, /print\s*\(\s*copper\s*\)\s*$/) + } +}) + ``` # --seed-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md index 2b231ae0b9d..b475cfd6a20 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md @@ -9,14 +9,18 @@ dashedName: step-8 The same syntax can be used to change the value of an existing key. -Just before the `print()` call, access the `species` key and reassign its value to `Cavia porcellus`. +Just before the `print()` call, access the `'species'` key and reassign its value to `'Cavia porcellus'`. # --hints-- -You should reassign the `copper['species']` to the string `Cavia porcellus` before the `print()` call. +You should reassign the `copper['species']` to the string `'Cavia porcellus'` before the `print()` call. ```js -({ test: () => assert.match(code, /^copper\s*\[\s*("|')species\1\s*\]\s*=\s*("|')Cavia porcellus\2.*^print\s*\(\s*copper\s*\)/ms) }) +({ test: () => { + const commentless_code = __helpers.python.removeComments(code); + assert.match(commentless_code, /^copper\s*\[\s*("|')species\1\s*\]\s*=\s*("|')Cavia porcellus\2\s+^print\s*\(\s*copper\s*\)/m) + } +}) ``` # --seed-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 74c66608ec6..ac2ee344d92 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -1,31 +1,31 @@ --- id: 6579cbab9825b8170974c69a -title: Step 9 +title: Step 13 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- -You can remove a key-value pair from a dictionary by using the `del` keyword. The syntax is the following: +You can remove a key-value pair from a dictionary by using the `del` keyword: ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } del my_dict['occupation'] ``` -Just before your `print()` call, use the `del` keyword to delete the `age` key and its value from `copper`. +Just before your `for` loop, use the `del` keyword to delete the `'age'` key and its value from `copper`. # --hints-- -You should use the `del` keyword to delete `copper['age']` before the `print()` call. +You should use the `del` keyword to delete `copper['age']` before the `for` loop. ```js -({ test: () => assert.match(code, /^del\s+copper\s*\[\s*("|')age\1\s*\].*^print\s*\(\s*copper\s*\)/ms) }) +({ test: () => assert.match(code, /^del\s+copper\s*\[\s*("|')age\1\s*\].*^for\s*/ms) }) ``` # --seed-- @@ -41,6 +41,7 @@ copper = { copper['food'] = 'hay' copper['species'] = 'Cavia porcellus' -print(copper) +for i, j in copper.items(): + print(i, j) --fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index b8125ac549a..aa4676d7334 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -1,22 +1,26 @@ --- id: 6579cd5f6dd62c189e53ddbb -title: Step 10 +title: Step 14 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- -Now that you got the basic aspects of dictionaries, you can proceed to build the shortest path algorithm. +Now that you reviewed the basic aspects of dictionaries, you can proceed to build the shortest path algorithm. Delete every line of code after the declaration of the `copper` dictionary. # --hints-- -You should delete the lines after the declaration of your dictionary. +You should delete all the lines of code after the declaration of your dictionary. ```js -({ test: () => assert.isFalse( /copper\s*\[.*?\]|del|print\s*\(.*?\)/ms.test(code)) }) +({ test: () => { + const commentless_code = __helpers.python.removeComments(code); + assert.isFalse( /copper\s*\[.*?\]|del|for|print\s*\(.*?\)/ms.test(commentless_code)) + } +}) ``` # --seed-- @@ -32,6 +36,8 @@ copper = { copper['food'] = 'hay' copper['species'] = 'Cavia porcellus' del copper['age'] -print(copper) + +for i, j in copper.items(): + print(i, j) --fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index 3992df1d58b..a4dbb22d57c 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -1,16 +1,19 @@ --- id: 6579dd49fa8a8e1fd06b85a9 -title: Step 11 +title: Step 15 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- Graphs are data structures representing relations between pairs of elements. These elements, called *nodes*, can be real-life objects, entities, points in space or others. The connections between the nodes are called the *edges*. - -For example, a graph can be used to represent two points in the space, `A` and `B`, connected by a path. A graph like this will be made of two nodes connected by an edge. + +Here's a visual representation of a graph: + +a weighted graph with 6 nodes + Rename the `copper` dictionary into `my_graph`. This will represent the graph to test your algorithm. diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..6395759c284 --- /dev/null +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,70 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(runPython(` + "B" in my_graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(runPython(` + my_graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(runPython(` + "A" in my_graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(runPython(` + my_graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(runPython(` + len(my_graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 41cb6ca82c6..b3e8a851b7f 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: Paso 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index 954db103e23..a9eeff30744 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: Paso 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 26ce8d5c3e3..f1b8c98d61b 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: Paso 14 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index f546cc1ee2f..63c5453e4f5 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: Paso 15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 383cf9e65cb..e63de82511a 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: Paso 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index 8916491d879..54a74e3e70d 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: Paso 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index daf942f5993..b8cbc9afbd1 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: Paso 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index 5ff31618e0d..b3926b4e80d 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: Paso 21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index d8d1cacc473..515b8964bd0 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: Paso 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index 3f5953ca711..f9e4e608791 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: Paso 23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index 6c7704f544a..01116b18242 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: Paso 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index e4e85024e8a..1db21528a0f 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: Paso 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 3e0e8af4530..3125d5f80d6 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: Paso 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index d77df673e7d..96cf01ab30a 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: Paso 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index bf2ae2bafdf..a0af08e658a 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: Paso 28 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index 4a8e72d62db..7c4a4287094 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: Paso 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index 1504089b5c1..8883fb04d8e 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: Paso 30 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index c0a4f9e05c9..fdf74ce403d 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: Paso 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index d52b23e1c30..da71bbfbefa 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: Paso 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index ae8a9a5a7e0..fbb5c9e9c4b 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: Paso 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index 16f4ea59885..120b9f01123 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: Paso 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index 321cee72667..d1ac52a2ef8 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: Paso 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index a99554cdfbc..a200e020ee8 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: Paso 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index cbdd3e5241b..3ab0c08fc00 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: Paso 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index 73e3b55ff93..9f75dd59c59 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: Paso 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index b7c20425d0b..48261c3b45f 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: Paso 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index 8273502d666..b96197956ab 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: Paso 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index 788fe172217..091734580de 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: Paso 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index dea29445e0d..76739ebe50e 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: Paso 43 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index 192d44934a0..eabd707e466 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: Paso 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index f1e13afb621..841d3f427ed 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: Paso 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index 91a56b969b3..0b787142dec 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: Paso 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index 16bfa6e5b73..d82a9048731 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: Paso 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index ba13188819b..9ac81068d75 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: Paso 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 0f4d987e468..b42fe957760 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: Paso 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index 853321f6a40..5cd2411e7d8 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: Paso 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index 59522ecd903..ed8f37bdf65 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: Paso 52 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index b0b3418e242..a8c11fdffb4 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: Paso 54 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index f436e8b4a59..bad21840a6a 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: Paso 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index 10498b7c0d6..6c9d5b7ec54 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: Paso 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index 3ca3217801f..6342fff9228 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: Paso 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index f09e53db245..27b5fafb53a 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: Paso 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index d573a433bea..474d0574907 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: Paso 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 45f25092904..786e4cb562c 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: Paso 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index 0d20a70850e..92c9ac47f36 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: Paso 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index ddfc7c28bda..5d6967a46fc 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: Paso 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 641abd8129c..25e8c5fb574 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: Schritt 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index 7e0c52f2a5a..b92def4216a 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: Schritt 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 66a87a6e95e..d5dcbaf0eac 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: Schritt 14 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index c7452c77246..5dea70458c5 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: Schritt 15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 4542471964f..1d64b3af0a0 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: Schritt 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index c0f994a7d88..a29d204c1de 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: Schritt 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index db30d9d9f6e..79bae60bbf8 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: Schritt 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index bc66b00c194..4492b30fc30 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: Schritt 21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 2edaf8f9052..6a1024666c7 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: Schritt 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index ed18c1d9e98..62e73b8447c 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: Schritt 23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index 72df12a0bc8..a933d955b97 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: Schritt 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index f7f46f6407c..c6a1d7fb198 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: Schritt 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 1f04bd17df0..4c578dced1b 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: Step 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index ece9ea15b17..6552f6c3ebb 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: Schritt 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index 4d5e286ad33..418e0ac79f9 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: Schritt 28 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index a629f619367..4bb822888a2 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: Schritt 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index 65527dee468..7b3bf19f396 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: Schritt 30 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index 1baa719d923..760201f0030 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: Schritt 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 51233e40abd..7ef3c5ba085 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: Schritt 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index e33337aefb9..536b906b6bf 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: Schritt 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index 7a85f28582d..7f52e34ff71 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: Schritt 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index b9253354852..ea8a743ea64 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: Schritt 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index 8a6b28081cb..774928ab4b8 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: Schritt 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index 08b3136ba42..88a6929b5b6 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: Schritt 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index cb0d77a4199..10f549a2dc1 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: Schritt 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index 0db4dee690d..436d9a3eec9 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: Schritt 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index c464db8f0ae..19c5ea26a86 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: Schritt 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index 8b3775650ca..4cdaf76225d 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: Schritt 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index cfe7a59d060..6d99bb55eb4 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: Schritt 43 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index 445f03ba8e8..54c65b1fb15 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: Schritt 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index c0e8d644698..9234a85ceaa 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: Schritt 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index 0b5199d5ddc..a134ac1c24a 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: Schritt 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index e27a0353d81..7569a4080dd 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: Schritt 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index 6d7f54daf6e..297bf3b8350 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: Schritt 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index e1c6b2520e6..4d2556307ea 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: Schritt 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index e52596e52fc..91f722988e9 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: Schritt 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index 6de0437ae26..e448c7db22f 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: Schritt 52 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index 8ccbf19712b..0e5f6ee9e10 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: Schritt 54 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index b1301a76865..a21276ae8cf 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: Schritt 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index 5f8d8267650..778430c1430 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: Schritt 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index d12dbb86156..6943f805575 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: Schritt 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 6cd25bd52bc..9f956dd10bf 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: Schritt 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index 6e86cc40902..bfa68180de1 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: Schritt 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 47aa01f80a4..2d013d1272a 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: Schritt 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index 3fde4130a44..82193019f2e 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: Schritt 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index 5996b6a58a3..fa21c37ba7d 100644 --- a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: Schitt 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/german/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md index 84b10fb783a..08d8aceb982 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md @@ -1,6 +1,6 @@ --- id: 65576ff7888f9e96f52a4be1 -title: Passo 2 +title: Step 2 challengeType: 20 dashedName: step-2 --- @@ -16,20 +16,11 @@ my_dict = { } ``` -Add a new key-value pair to your dictionary. Use the string `species` as the key, and the string `guinea pig` as the value. +Add a new key-value pair to your dictionary. Use the string `'species'` as the key, and the string `'guinea pig'` as the value. # --hints-- -You should add a new key-value pair to your `copper` dictionary. - -```js -({ test: () => assert(runPython(` - len(copper) == 1 - `)) -}) -``` - -You should have a `species` key with the value `guinea pig` inside your `copper` dictionary. +You should have a `'species'` key with the value `'guinea pig'` inside your `copper` dictionary. ```js ({ test: () => assert(runPython(` @@ -38,6 +29,15 @@ You should have a `species` key with the value `guinea pig` inside your `copper` }) ``` +Your `copper` dictionary should have a single key-value pair. + +```js +({ test: () => assert(runPython(` + len(copper) == 1 + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 69edb77063f..c10f2283d5a 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -1,17 +1,19 @@ --- id: 6557709b0aee699a6a00528c -title: Step 12 +title: Step 16 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- -Now, replace the existent keys with the strings `A` and `B` — one for each node. Then, replace each value with the string representing the node connected to the key. +For example, a graph can be used to represent two points in the space, `A` and `B`, connected by a path. A graph like this will be made of two nodes connected by an edge. + +Replace the existent `'species'` key with the strings `'A'`. Then, replace the correspondent value with the string `'B'` to represent the connection between the `'A'` and `'B'` nodes. # --hints-- -Your dictionary should have an `A` key. +Your dictionary should have an `'A'` key. ```js ({ test: () => assert(runPython(` @@ -20,7 +22,7 @@ Your dictionary should have an `A` key. }) ``` -Your `A` key should have `B` as the value. +Your `'A'` key should have `'B'` as the value. ```js ({ test: () => assert(runPython(` @@ -29,24 +31,6 @@ Your `A` key should have `B` as the value. }) ``` -Your dictionary should have an `B` key. - -```js -({ test: () => assert(runPython(` - "B" in my_graph - `)) -}) -``` - -Your `B` key should have `A` as the value. - -```js -({ test: () => assert(runPython(` - my_graph["B"] == "A" - `)) -}) -``` - Your dictionary should have two keys. ```js diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index aad91960c07..7215d816254 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -1,19 +1,21 @@ --- id: 6557712d77ce2d9bd7e63afd -title: Step 13 +title: Step 18 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- Add another node connected to `B` to your graph and call it `C`. -Modify your existing dictionary to represent this arrangement. Use a list to represent the multiple connections of your `B` node. +Modify your existing dictionary to represent this arrangement: add another key `'C'` to `my_graph` and give it the value of the string `'B'`. + +Also, change the value of the existing `'B'` key into the list `['A', 'C']` to represent the multiple connections of your `'B'` node. # --hints-- -Your dictionary should have 3 keys — `A`, `B`, and `C`. +Your dictionary should have 3 keys — `'A'`, `'B'`, and `'C'`. ```js ({ test: () => assert(runPython(` @@ -23,7 +25,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -`my_graph["A"]` should have the `B` node as the value. +The value of `my_graph['A']` should be the string `'B'`. ```js ({ test: () => assert(runPython(` @@ -32,7 +34,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -`my_graph["B"]` should be a list. +`my_graph['B']` should be a list. ```js ({ test: () => assert(runPython(` @@ -41,7 +43,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -The value of `my_graph["B"]` should be a list containing the other two nodes. +The value of `my_graph['B']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` @@ -50,7 +52,7 @@ The value of `my_graph["B"]` should be a list containing the other two nodes. }) ``` -The value of `my_graph["C"]` should be the connected node. +The value of `my_graph['C']` should be the string `'B'`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 5d34b32984c..214acd525c5 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -1,17 +1,19 @@ --- id: 6557716aadbd2d9c42c0e69a -title: Step 14 +title: Step 19 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- -Add one last node, `D`, which is connected with `A` and `C`. Modify your dictionary to represent this structure. Again, use a list to represent multiple connections. +Add one last node, `'D'`, which is connected with `'A'` and `'C'`. + +Modify your dictionary to represent this structure. Again, use a list to represent multiple connections. # --hints-- -Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. +Your dictionary should have 4 keys called `'A'`, `'B'`, `'C'`, and `'D'`. ```js ({ test: () => assert(runPython(` @@ -21,7 +23,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["A"]` should be a list. +`my_graph['A']` should be a list. ```js ({ test: () => assert(runPython(` @@ -30,7 +32,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["A"]` should be a list containing `B` and `D`. +`my_graph['A']` should be a list containing `'B'` and `'D'`. ```js ({ test: () => assert(runPython(` @@ -39,7 +41,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["B"]` should be a list. +`my_graph['B']` should be a list. ```js ({ test: () => assert(runPython(` @@ -48,7 +50,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["B"]` should be a list containing `A` and `C`. +`my_graph['B']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` @@ -57,7 +59,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["C"]` should be a list. +`my_graph['C']` should be a list. ```js ({ test: () => assert(runPython(` @@ -66,7 +68,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["C"]` should be a list containing `B` and `D`. +`my_graph['C']` should be a list containing `'B'` and `'D'`. ```js ({ test: () => assert(runPython(` @@ -75,7 +77,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["D"]` should be a list. +`my_graph['D']` should be a list. ```js ({ test: () => assert(runPython(` @@ -84,7 +86,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["D"]` should be a list containing `A` and `C`. +`my_graph['D']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 41a7c0d4f5a..42b1e248037 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -1,8 +1,8 @@ --- id: 655771d889132f9ccd341060 -title: Passo 15 +title: Step 20 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- @@ -13,37 +13,11 @@ In your case, these weights will be the distances between each node, or point in The first element in the tuple will be the connected node, and the second element will be an integer number indicating the distance. -Modify `my_graph["A"]` into a list of tuples, considering the following distances: - -| Edge | Weight | -| ---- | ------ | -| A-B | 3 | -| B-C | 4 | -| C-D | 7 | -| D-A | 1 | +Modify `my_graph['A']` into a list of tuples, considering that the `A-B` distance is `3` and the `A-D` distance is `1`. # --hints-- -Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. - -```js -({ test: () => assert(runPython(` - key_list = ["A", "B", "C", "D"] - len(my_graph) == 4 and all(key in my_graph for key in key_list) - `)) -}) -``` - -`my_graph["A"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["A"]) is list and all(type(i) is tuple for i in my_graph["A"]) - `)) -}) -``` - -`my_graph["A"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph["A"]` should be a list containing the tuples `('B', 3)` and `('D', 1)`. ```js ({ test: () => assert(runPython(` @@ -53,6 +27,16 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index a33c4b2f57f..c25039adc3f 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -1,19 +1,19 @@ --- id: 65577236b056379d5dbc7000 -title: Step 18 +title: Step 23 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- Now you are going to start developing the algorithm to calculate the shortest path between each node in your new graph. -Declare an empty function called `shortest_path` and don't forget the `pass` keyword. +Declare an empty function called `shortest_path`. Use the `pass` keyword to fill the function body. # --hints-- -You should have a `shortest_path` function. +You should define a function named `shortest_path`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index 14525c1e89b..702a4b5e6ba 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -1,8 +1,8 @@ --- id: 655773b0591c5f9f4045883e -title: Passo 19 +title: Step 24 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- @@ -13,7 +13,7 @@ For that your function needs two parameters: `graph`, and `start`. Add them to y # --hints-- -Your function should accept `graph` and `start` as the parameters, in this order. +Your function should take `graph` and `start` as the parameters, in this order. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index f6578234e43..f2542698e74 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -1,8 +1,8 @@ --- id: 655773f8b8b5db9fc6d0ae76 -title: Step 20 +title: Step 25 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- @@ -13,28 +13,16 @@ Now, replace the `pass` keyword with a variable named `unvisited` and assign it # --hints-- -You should have a variable called `unvisited`. +You should have a variable called `unvisited` inside the `shortest_path` function. ```js -({ test: () => - { - const shortest_path = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest_path; - assert(function_body.match(/unvisited\s*=/)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").has_variable("unvisited")`)) }) ``` -Your `unvisited` variable should be an empty list. +You should assign an empty list to your `unvisited` variable. Remember to delete `pass`. ```js -({ test: () => - { - const shortest_path = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest_path; - assert(function_body.match(/unvisited\s*=\s*\[\s*\]/)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_body().is_equivalent("unvisited = []")`)) }) ``` # --seed-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index 535c3dd38d1..e8883fb7c61 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -1,13 +1,13 @@ --- id: 6557743527cb92a06417ea97 -title: Step 21 +title: Step 26 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- -Create a `for` loop to iterate over your graph, and append each node to the `unvisited` list. +Create a `for` loop to iterate over your graph, and use the `.append()` method to add each node to the end of the `unvisited` list. # --hints-- @@ -15,9 +15,9 @@ You should create a `for` loop to iterate over `graph` inside the `shortest_path ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for\s+(\w+)\s+in\s+graph\s*:/m)); + const commentless_code = __helpers.python.removeComments(code); + const {function_body} = __helpers.python.getDef(commentless_code, "shortest_path"); + assert(function_body.match(/^\s*for\s+\w+\s+in\s+graph\s*:/m)); } }) ``` @@ -26,9 +26,12 @@ You should append each node to `unvisited` inside your `for` loop. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for\s+(\w+)\s+in\s+graph\s*:\s*^\1\1unvisited\.append\s*\(\s*\2\s*\)/m)); + const commentless_code = __helpers.python.removeComments(code); + const block_regex = /for\s+(\w+)\s+in\s+graph\s*/; + const {block_body} = __helpers.python.getBlock(commentless_code, block_regex); + const loop_condition = commentless_code.match(block_regex); + const regex = new RegExp(`^\\s+unvisited\\.append\\s*\\(\\s*${loop_condition[1]}\\s*\\)`, "m"); + assert(block_body.match(regex)); } }) ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 85683677008..bc7c109ce87 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -1,8 +1,8 @@ --- id: 6557746aad2844a0cd864e12 -title: Step 22 +title: Step 27 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- @@ -13,7 +13,7 @@ Before your `for` loop, create a new variable named `distances` and assign it an # --hints-- -You should have a `distances` variable. +You should have a variable named `distances`. ```js ({ test: () => { diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index 30203fee2b4..20194065cc5 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -1,8 +1,8 @@ --- id: 655774955b097ea14897db12 -title: Step 23 +title: Step 28 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- @@ -17,9 +17,9 @@ You should create an `if` statement that executes when `node` is equal to `start ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1\1if\s+node\s*==\s*start\s*:/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /for\s+node\s+in\s+graph\s*/); + assert(block_body.match(/unvisited\.append\s*\(\s*node\s*\)\s*^\s+if\s+(node\s*==\s*start|start\s*==\s*node)\s*:/m)); } }) ``` @@ -28,9 +28,9 @@ Inside your new `if` statement you should assign `0` to the node in the `distanc ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1\1if\s+node\s*==\s*start\s*:\s*^\1\1\1distances\s*\[\s*node\s*\]\s*=\s*0/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+(node\s*==\s*start|start\s*==\s*node)\s*/m); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*0/m)); } }) ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index 904217952c5..b098e869e4d 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -1,15 +1,15 @@ --- id: 655774d01daeeaa1978b99d5 -title: Step 24 +title: Step 29 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- At the beginning, all the other nodes in the graph are considered to be at infinite distance from the source node, because the distance has not been determined yet. -Create an `else` clause and assign an infinite value to the node in the `distances` dictionary. For that, use the `float()` function with the string `inf` as argument to generate a floating point number representing the positive infinity. +Create an `else` clause and assign an infinite value to the node in the `distances` dictionary. For that, use the `float()` function with the string `'inf'` as argument to generate a floating point number representing the positive infinity. # --hints-- @@ -28,9 +28,9 @@ You should assign `float('inf')` to `distances[node]` inside your new `else` cla ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if.*:.*^\1else\s*:\s*^\1\s{4}distances\s*\[\s*node\s*\]\s*=\s*float\s*\(\s*("|')inf\2\s*\)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, "else"); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*float\s*\(\s*("|')inf\1\s*\)\s*$/)); } }) ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index f612f5496eb..2f29188731d 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -1,8 +1,8 @@ --- id: 655775221059f5a20493d5d7 -title: Step 25 +title: Step 30 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 1f04bd17df0..a06ef5cddc1 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -1,8 +1,8 @@ --- id: 655776db1eeae0a620e42a0d -title: Step 26 +title: Step 31 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index 92c06af759b..f5f032edcd0 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -1,8 +1,8 @@ --- id: 655777060d8ddea6741be1b1 -title: Step 27 +title: Step 32 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- @@ -47,7 +47,7 @@ def shortest_path(graph, start): else: distances[node] = float('inf') print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index bf817fb18b2..b695c39413b 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -1,8 +1,8 @@ --- id: 65577739f57ecca6c39bb4e9 -title: Step 28 +title: Step 33 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- @@ -51,9 +51,9 @@ my_graph = { def shortest_path(graph, start): unvisited = [] distances = {} - + print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index d373bb7ee2e..58bf73655a4 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -1,8 +1,8 @@ --- id: 65577791ad8c26a7705e2919 -title: Step 29 +title: Step 34 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- @@ -13,13 +13,15 @@ With a dictionary comprehension, you can create a dictionary starting from an ex {key: val for key in dict} ``` +In the example above, `val` is the value that `key` will have in the new dictionary, and `dict` is the existing dictionary. + You want to keep track of the paths between the starting node and each other node. After the `distances` variable, create a `paths` variable and assign it a dictionary with all the keys from `graph`. Assign an empty list to each key and use a dictionary comprehension to build your dictionary. # --hints-- -You should have a `paths` variable. +You should have a variable named `paths`. ```js ({ test: () => { @@ -34,8 +36,7 @@ Your `paths` variable should use the dictionary comprehension syntax to assign a ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; + const {function_body} = __helpers.python.getDef(code, "shortest_path"); assert(function_body.match(/^\s{4}paths\s*\=\s*\{\s*(\w+)\s*:\s*\[\s*\]\s+for\s+\1\s+in\s+graph\s*\}/m)); } }) @@ -57,9 +58,9 @@ my_graph = { def shortest_path(graph, start): unvisited = list(graph) distances = {} - + print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index dfa6454e4b9..787dd058d2f 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -1,8 +1,8 @@ --- id: 65577a17564ce8a8e06c1460 -title: Step 30 +title: Step 35 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- @@ -13,7 +13,9 @@ Dictionary comprehensions support conditional `if`/`else` syntax too: {key: val_1 if condition else val_2 for key in dict} ``` -Use a dictionary comprehension to create a dictionary based in `graph` and assign it to the `distances` variable. Give the key a value of zero if the node is equal to the starting node, and infinite otherwise. Use `float('inf')` to achieve the latter. +In the example above, `dict` is the existing dictionary. When `condition` evaluates to `True`, `key` will have the value `val_1` , otherwise `val_2`. + +Use a dictionary comprehension to create a dictionary based on `graph` and assign it to the `distances` variable. Give the key a value of zero if the node is equal to the starting node, and infinite otherwise. Use `float('inf')` to achieve the latter. # --hints-- @@ -46,7 +48,7 @@ def shortest_path(graph, start): distances = {} paths = {node: [] for node in graph} print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index c18bf7f6142..1f59bb3cac3 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -1,20 +1,20 @@ --- id: 65578c17d54dfab65cd54b95 -title: Passo 31 +title: Step 36 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- Since the algorithm begins its assessment from the starting node, after creating the `paths` dictionary, you need to add the starting node to its own list in the `paths` dictionary. -Use the `append()` method to append `start` to the `paths[start]` list. +Use the `.append()` method to append `start` to the `paths[start]` list. # --hints-- -You should use the `append()` method to append `start` to `paths[start]`. +You should use the `.append()` method to append `start` to `paths[start]`. ```js ({ test: () => { @@ -41,9 +41,9 @@ def shortest_path(graph, start): unvisited = list(graph) distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} - + print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 96f7edcd22f..77bacd43df0 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -1,8 +1,8 @@ --- id: 65578c74607d40b6d8c4757f -title: Step 32 +title: Step 37 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- @@ -39,9 +39,9 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index 7832f5a4ed6..93e13d14b83 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -1,13 +1,13 @@ --- id: 65578cb031cd93b77a285db2 -title: Step 33 +title: Step 38 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- -Your function is going to explore all the nodes connected to the starting node. It will calculate the shortest paths for all of them. Then, it will remove the starting node from the unvisited nodes. +Your function is going to explore all the nodes connected to the starting node. It will calculate the shortest paths for all of them. Then, it will remove the starting node from the unvisited nodes. Next, the closest neighbor node will be visited and the process will be repeated until all the nodes are visited. @@ -38,9 +38,9 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index ba5aa351ad6..d3599b7f08c 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -1,8 +1,8 @@ --- id: 65578cee7f2cb8b80127cce2 -title: Step 34 +title: Step 39 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- @@ -15,9 +15,12 @@ You should have a `while` loop that executes while `unvisited` is not empty. Don ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1pass(?=\s*^\1print)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {function_body} = __helpers.python.getDef(commentless_code, "shortest_path"); + assert(function_body.match(/^\s+while\s+(unvisited|unvisited\s*!=\s*\[\s*\]|len\s*\(\s*unvisited\s*\)\s*(>|!=)\s*0)\s*:/m)); + const {block_body} = __helpers.python.getBlock(commentless_code, /while\s+(unvisited|unvisited\s*!=\s*\[\s*\]|len\s*\(\s*unvisited\s*\)\s*(>|!=)\s*0)\s*/); + assert(block_body.match(/\s+pass/)) + } }) ``` @@ -40,9 +43,9 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index f412362390e..2896691a3cb 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -1,8 +1,8 @@ --- id: 65578d0f6c78a0b868a43b9c -title: Step 35 +title: Step 40 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- @@ -16,23 +16,13 @@ Remove `pass`, then create a variable called `current` and assign it `min(unvisi You should create a `current` variable in your `while` loop. ```js -({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1current\s*=/ms)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_whiles()[0].has_variable("current")`)) }) ``` -You should assign `min(unvisited)` to your `current` variable. +You should assign `min(unvisited)` to your `current` variable. Remember to delete `pass`. ```js -({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1current\s*=\s*min\s*\(\s*unvisited\s*\)/ms)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_whiles()[0].find_bodies()[0].is_equivalent("current = min(unvisited)")`)) }) ``` # --seed-- @@ -57,7 +47,7 @@ def shortest_path(graph, start): pass --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index 12646d5a2d0..05bc3042843 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -1,15 +1,15 @@ --- id: 65578d4fc3afc3b8f554c882 -title: Step 36 +title: Step 41 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- `min()` takes also a keyword-only argument. Passing a function as an additional argument to `min()`, you can modify the way the list items are compared. -The result of the line you've just written in the previous step is the node that comes first in alphabetical order. Instead you want to select the unvisited node having the smallest distance from the starting node. +The result of the line you've just written in the previous step is the node that comes first in alphabetical order. Instead you want to select the unvisited node having the smallest distance from the starting node. Pass `key=distances.get` as the second argument to your `min()` call. In this way, the comparison will take place depending on the value each `unvisited` list item has inside the `distances` dictionary. @@ -48,7 +48,7 @@ def shortest_path(graph, start): current = min(unvisited) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index 18158563cbf..3aac660e0ba 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -1,13 +1,13 @@ --- id: 65578f895f2a65ba7a916804 -title: Passo 37 +title: Step 42 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- -After the `current` variable assignment, create a `for` loop to iterate over the tuples in the `graph[current]` list. You will need two iterating variables for that. +After the `current` variable assignment, create a `for` loop to iterate over the tuples in the `graph[current]` list. You will need two iterating variables for that. Remember to use `pass` to fill the loop body. # --hints-- @@ -44,7 +44,7 @@ def shortest_path(graph, start): current = min(unvisited, key=distances.get) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index 77e3618f948..aff816846ec 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -1,13 +1,13 @@ --- id: 65578fcf00322dbad5dee05b -title: Step 38 +title: Step 43 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- -Create an `if` statement to check if the distance of the neighbor node (the second item in the processed tuple) plus the distance of `current` is less than the currently known distance of the neighbor node (the first item in the processed tuple). +Create an `if` statement to check if the distance of the neighbor node (the second item in the processed tuple) plus the distance of `current` is less than the currently known distance of the neighbor node (the first item in the processed tuple). Use the `pass` keyword to temporarily fill the body of the `if`. @@ -41,7 +41,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) --fcc-editable-region-- @@ -49,7 +49,7 @@ def shortest_path(graph, start): pass --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index eeaad2c7d62..d2fa44585df 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -1,15 +1,15 @@ --- id: 655790d113d14dbb727eaf41 -title: Step 40 +title: Step 45 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- Once the distance to a node is set inside the `distances` dictionary, you need to keep track of the path to that node, too. If the distance for the node in the processed tuple has been updated, the last item in its path is the node itself. -Inside your conditional, nest another `if` statement that triggers when the last element of `paths[node]` is equal to `node`. +Inside your conditional, nest another `if` statement that triggers when the last element of `paths[node]` is equal to `node`. Use `pass` to fill the `if` statement body. # --hints-- @@ -49,6 +49,6 @@ def shortest_path(graph, start): distances[node] = distance + distances[current] --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index 458fb5974ef..71e88436f71 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -1,8 +1,8 @@ --- id: 6557910b0ebaeebc18209e90 -title: Step 41 +title: Step 46 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- @@ -49,7 +49,7 @@ def shortest_path(graph, start): pass --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index bb8994cb4b9..18b7a83beee 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -1,28 +1,37 @@ --- id: 6557913b8fe5c0bc834c9f4f -title: Step 42 +title: Step 47 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- -Next, create an `else` statement and use the `extend()` function to add the current node path to the neighbor node path. +The `.extend()` method, allows you to add elements from an iterable to the end of a list: + +```py +my_list = ['larch', 'birch'] +tree_list = ['fir', 'redwood', 'pine'] +my_list.extend(tree_list) +print(my_list) # Output: ['larch', 'birch', 'fir', 'redwood', 'pine'] +``` + +Create an `else` clause and use the `.extend()` method to add the current node path to the neighbor node path. # --hints-- -You should create an `else` statement after your nested `if`. +You should create an `else` clause after your nested `if` statement. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if\s+paths\s*\[\s*node\s*\]\s*\[\s*-\s*1\s*\]\s*==\s*node\s*:\s*^\1(\s{4})paths\s*\[\s*node\s*\]\s*=\s*paths\s*\[\s*current\s*\]\s*^\1else\s*:/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*/); + assert(block_body.match(/^\s+else\s*:/m)); } }) ``` -You should call `extend()` on the neighbour node path passing the current node path as the argument. +You should have `paths[node].extend(paths[current])` in your `else` clause. ```js ({ test: () => { @@ -50,7 +59,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -61,7 +70,7 @@ def shortest_path(graph, start): paths[node] = paths[current] --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index dbac5a53209..078f3aa7bef 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -1,17 +1,17 @@ --- id: 655791847db8a9bd0b685f40 -title: Step 43 +title: Step 48 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- -Finally, outside the nested conditionals, append the neighbor node to its path. +Finally, below the `else` clause, append the neighbor node to its path. # --hints-- -You should append `node` to `paths[node]` just after your `else` statement. +You should append `node` to `paths[node]` just after your `else` clause. ```js ({ test: () => { @@ -51,7 +51,7 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index 3f8fd4bea7f..93aab637e14 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -1,23 +1,33 @@ --- id: 655791ae44c182bd92f31caa -title: Step 44 +title: Step 49 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- +The `.remove()` method removes from a list the first matching element that is passed as the argument: + +```py +my_list = ['larch', 1, True, 1] +my_list.remove(1) +print(my_list) # Output: ['larch', True, 1] +``` + Terminate the `while` loop by removing the current node from the `unvisited` list. Pay attention to the indentation. # --hints-- -You should use the `remove()` function to remove the current node from `unvisited` after your `for` loop. +You should use the `.remove()` method to remove the current node from `unvisited` after your `for` loop. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1unvisited\.remove\s*\(\s*current\s*\)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /while\s+unvisited/); + assert(block_body.match(/^\s+unvisited\.remove\s*\(\s*current\s*\)/m)); + const {block_body: for_body} = __helpers.python.getBlock(commentless_code, /for\s+node\s*,\s*distance\s+in\s+graph\s*\[\s*current\s*\]\s*/); + assert.notMatch(for_body, /^\s+unvisited\.remove\s*\(\s*current\s*\)/m); } }) ``` @@ -52,7 +62,7 @@ def shortest_path(graph, start): paths[node].append(node) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index 3d08d5ce21f..5d6f30ebda8 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -1,13 +1,13 @@ --- id: 655791e6cf5e03be3de73451 -title: Step 45 +title: Step 50 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- -If you try to uncomment your function call, it won't work. You have a couple of bugs to fix. The first one happens because in the nested `if` you are trying to access that might not exist in your `paths` dictionary. So, you need to be sure that `paths[node]` is not empty before accessing `paths[node][-1]`. +If you try to uncomment your function call, it won't work. You have a couple of bugs to fix. The first one happens because in the nested `if` you are trying to access an element that might not exist in your `paths[node]` list. So, you need to be sure that `paths[node]` is not empty before accessing `paths[node][-1]`. Add an additional condition to your nested `if` statement to ensure that `paths[node]` is non-empty before accessing `paths[node][-1]`. @@ -41,7 +41,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -55,9 +55,9 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index 9e48d484447..de0d71fe456 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -1,21 +1,27 @@ --- id: 65579228c669fcbebffd01d5 -title: Step 47 +title: Step 52 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- -The other bug is subtle. When a shorter distance is found for a neighbor node, `paths[current]` gets assigned to the neighbor node path, `paths[node]`. +The other bug is subtle. When a shorter distance is found for a neighbor node, `paths[current]` gets assigned to the neighbor node path, `paths[node]`. This means both variables point to the same list. Since lists are mutable, when you append the neighbor node to its path, both `paths[node]` and `paths[current]` are modified because they are the same list. This results in wrong paths, although the distances are correct. -Fix that bug by assigning a copy of `paths[current]` to the neighbor node path. Modify the existing assignment inside your `if` block. +You can fix that bug by assigning a copy of `paths[current]` to the neighbor node path. For that you can use the slice syntax: + +```py +my_list[:] +``` + +Where `my_list` is the list you want to copy. Modify the existing `paths[node] = paths[current]` assignment inside your `if` block by slicing `paths[current]`. # --hints-- -You should use the slice syntax to assign a copy of `paths[current]` to the neighbor node path. +You should assign `paths[current][:]` to the neighbor node path. ```js ({ test: () => assert.match(code, /^(\s*)if\s+paths\s*\[\s*node\s*\]\s+and\s+paths\s*\[\s*node\s*\]\s*\[\s*-\s*1\s*\]\s*==\s*node\s*:\s*^\1\s{4}paths\s*\[\s*node\s*\]\s*=\s*paths\s*\[\s*current\s*\]\s*\[\s*::?\s*\]/ms) }) @@ -38,7 +44,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -52,9 +58,9 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index 63132e29106..08f56f3a18b 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -1,8 +1,8 @@ --- id: 6557924d47c325bf27afbe51 -title: Step 48 +title: Step 53 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- @@ -48,7 +48,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -60,9 +60,9 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index cbab2f3f4e2..ad534a1ed64 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -1,8 +1,8 @@ --- id: 6557927ad11e58bf8c794b25 -title: Step 50 +title: Step 55 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- @@ -11,7 +11,7 @@ Create a `for` loop to iterate over `targets_to_print` and print the following f # --hints-- -You should create a `for` loop to iterate over `targets_to_print`. Use `node` as iteration variable. +You should create a `for` loop to iterate over `targets_to_print`. Use `node` as the loop variable. ```js ({ test: () => { @@ -51,7 +51,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 9306e351052..5a17874324e 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -1,8 +1,8 @@ --- id: 6559d70c5161b16ff1d6530d -title: Step 49 +title: Step 54 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- @@ -37,7 +37,7 @@ You should create a variable called `targets_to_print` after your `while` loop. }) ``` -You should the ternary syntax to assign `[target]` when `target` is truthy, and `graph` otherwise to your `targets_to_print` variable. +You should use the ternary syntax to assign `[target]` when `target` is truthy, and `graph` otherwise to your `targets_to_print` variable. ```js ({ test: () => { @@ -65,7 +65,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -79,7 +79,7 @@ def shortest_path(graph, start, target = ''): unvisited.remove(current) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index 457453481a9..bebe295c52d 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -1,8 +1,8 @@ --- id: 6559d86fe1b8947954b9178d -title: Step 51 +title: Step 56 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- @@ -53,7 +53,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -69,7 +69,7 @@ def shortest_path(graph, start, target = ''): targets_to_print = [target] if target else graph for node in targets_to_print: print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index 83f8c55c5d8..a6a85e17930 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -1,17 +1,17 @@ --- id: 6559da1b7d75f088f5e6b89f -title: Step 52 +title: Step 57 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- -Finally, at the very end of your function, return `distances` and `paths`. +Finally, at the very end of your function, return `distances, paths`. # --hints-- -You should return `distances` and `paths` at the bottom of your function. +You should return `distances, paths` at the bottom of your function. ```js ({ test: () => { @@ -39,7 +39,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -57,8 +57,8 @@ def shortest_path(graph, start, target = ''): if node == start: continue print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - - + + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index 9a599873ab0..b1679096f82 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -1,13 +1,13 @@ --- id: 6559da93115de78dbbdc7ba3 -title: Passo 54 +title: Step 59 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- -As a final step, modify your function call passing `F` as the third argument and check the output. +As a final step, modify your function call passing `'F'` as the third argument to print only the path from `A` to `F`. With that, the shortest path algorithm is complete. @@ -39,7 +39,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -51,15 +51,15 @@ def shortest_path(graph, start, target = ''): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + targets_to_print = [target] if target else graph for node in targets_to_print: if node == start: continue print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - + return distances, paths - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` @@ -81,7 +81,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -93,15 +93,15 @@ def shortest_path(graph, start, target = ''): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + targets_to_print = [target] if target else graph for node in targets_to_print: if node == start: continue print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - + return distances, paths - + shortest_path(my_graph, 'A', 'F') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index f7f4f834e4d..11de998a29f 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -1,26 +1,17 @@ --- id: 6566195b0a021bb660b2b4b1 -title: Step 16 +title: Step 21 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- -Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`. +Now modify `my_graph['B']` into a list of tuples, where the first element in the tuple is the connected node, and the second element is the distance. The `B-C` distance is `4`. # --hints-- -`my_graph["B"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["B"]) is list and all(type(i) is tuple for i in my_graph["B"]) - `)) -}) -``` - -`my_graph["B"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['B']` should be a list containing the tuples `('A', 3)` and `('C', 4)`. ```js ({ test: () => assert(runPython(` @@ -30,6 +21,16 @@ Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`. }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index d356c367fb3..cd4e33e8754 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -1,8 +1,8 @@ --- id: 65661b72d6745ebec6a96923 -title: Passaggio 17 +title: Step 22 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- @@ -11,16 +11,7 @@ In the same way, modify the remaining two lists considering that the `C-D` dista # --hints-- -`my_graph["C"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["C"]) is list and all(type(i) is tuple for i in my_graph["C"]) - `)) -}) -``` - -`my_graph["C"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['C']` should be a list containing the tuples `('B', 4)` and `('D', 7)`. ```js ({ test: () => assert(runPython(` @@ -30,16 +21,7 @@ In the same way, modify the remaining two lists considering that the `C-D` dista }) ``` -`my_graph["D"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["D"]) is list and all(type(i) is tuple for i in my_graph["D"]) - `)) -}) -``` - -`my_graph["D"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['D']` should be a list containing the tuples `('A', 1)` and `('C', 7)`. ```js ({ test: () => assert(runPython(` @@ -49,6 +31,36 @@ In the same way, modify the remaining two lists considering that the `C-D` dista }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + +`my_graph['A']` should be a list containing the tuples `('B', 3)` and `('D', 1)`. + +```js +({ test: () => assert(runPython(` + tuples = [("B", 3), ("D", 1)] + len(my_graph["A"]) == 2 and all(t in my_graph["A"] for t in tuples) + `)) +}) +``` + +`my_graph['B']` should be a list containing the tuples `('A', 3)` and `('C', 4)`. + +```js +({ test: () => assert(runPython(` + tuples = [("A", 3), ("C", 4)] + len(my_graph["B"]) == 2 and all(t in my_graph["B"] for t in tuples) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index 48faa3eba0f..6ddd8da7a6f 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -1,8 +1,8 @@ --- id: 6567722f53ad97d7ea6bb082 -title: Step 46 +title: Step 51 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- @@ -34,7 +34,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -48,9 +48,9 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 6a59b35a6de..a5cae41c450 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -1,8 +1,8 @@ --- id: 65774ae7c3eee66fe79b9459 -title: Step 53 +title: Step 58 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- @@ -35,7 +35,7 @@ You should modify `my_graph` into the provided graph. 'F': [('B', 2), ('D', 3)] } my_graph == g - + `)) }) ``` @@ -58,7 +58,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -76,7 +76,7 @@ def shortest_path(graph, start, target = ''): if node == start: continue print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - + return distances, paths shortest_path(my_graph, 'A') diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index 71969683242..1612e2689fc 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -1,23 +1,25 @@ --- id: 657891ab9c1903f4e55433ba -title: Step 39 +title: Step 44 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- +When the condition of your new `if` is true, a shorter path to the neighbor node has been found. + Inside your new `if` block, delete `pass` and reassign the neighbor node distance to the sum of the neighbor node distance plus the distance of `current`. # --hints-- -You should assign `distance + distances[current]` to the neighbor node distance inside your new `if`. +You should assign `distance + distances[current]` to `distances[node]` inside your new `if`. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*:\s*^\1\s{4}distances\s*\[\s*node\s*\]\s*=\s*distance\s*\+\s*distances\s*\[\s*current\s*\]/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*/); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*distance\s*\+\s*distances\s*\[\s*current\s*\]/)); } }) ``` @@ -48,7 +50,7 @@ def shortest_path(graph, start): pass --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md index 62db4d83c18..4124cd85e1a 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md @@ -10,9 +10,9 @@ dashedName: step-1 So far, you have already met different data types: - Immutable data types, such as integers, strings, tuples, and Booleans. -- Mutable data types, such as lists. +- Mutable data types, such as lists, and dictionaries. -A dictionary is a mutable data type and it is identified by a pair of curly braces, `{}`. +A dictionary is identified by a pair of curly braces, `{}`. Start by creating a variable called `copper` and assign it an empty dictionary using a pair of curly braces, in the same way you would create an empty list with a pair of square brackets. diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md index 0a6d148a90b..c9e787d4914 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md @@ -9,20 +9,11 @@ dashedName: step-3 Keys must be unique within a dictionary and they can be only immutable data types. This means you cannot use a list or another dictionary as keys. -Add another key `age` to your dictionary and give it the integer number `2` as value. +Add another key `'age'` to your dictionary and give it the integer number `2` as value. # --hints-- -You should add a new key-value pair to your `copper` dictionary. - -```js -({ test: () => assert(runPython(` - len(copper) == 2 - `)) -}) -``` - -You should have an `age` key with the value `2` just after `'species': 'guinea pig'`, inside your `copper` dictionary. Don't forget the comma. +You should have an `'age'` key with the value `2` just after `'species': 'guinea pig'`, inside your `copper` dictionary. Don't forget the comma. ```js ({ test: () => assert(runPython(` @@ -31,6 +22,15 @@ You should have an `age` key with the value `2` just after `'species': 'guinea p }) ``` +You should have two key-value pairs in your `copper` dictionary. + +```js +({ test: () => assert(runPython(` + len(copper) == 2 + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md index 4edd91c31c6..6319e57bf45 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md @@ -12,17 +12,17 @@ You can access the data stored in a dictionary through its keys: ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } my_dict['name'] # 'Michael' ``` -After your dictionary, follow the example above to access the `species` key of `copper` and print the result. +After your dictionary, follow the example above to access the `'species'` key of `copper` and print the result. # --hints-- -You should not modify your dictionary. +You should not modify the assignment of your dictionary. ```js ({ test: () => assert(runPython(` @@ -31,7 +31,7 @@ You should not modify your dictionary. }) ``` -You should use `copper['species']` to access the value of the `species` key. +You should use `copper['species']` to access the value of the `'species'` key. ```js ({ test: () => assert.match(code, /copper\s*\[\s*("|')species\1\s*\]/) }) diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md index 93d57c495e8..04524a61fbc 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md @@ -12,13 +12,13 @@ To add a new key-value pair after declaring a dictionary, you can indicate the k ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } my_dict['country'] = 'Canada' ``` -Delete your `print()` call. Then, after declaring `copper`, add the key `food` to your dictionary and set its value to `hay`. +Delete your `print()` call. Then, after the `copper` declaration, add the key `'food'` to your dictionary and set its value to `'hay'`. # --hints-- @@ -28,13 +28,13 @@ You should not have `print(copper['age'])` in your code. ({ test: () => assert.notMatch(code, /^print\(\s*copper\s*\[\s*("|')age\1\s*\]\s*\)/m) }) ``` -You should add the key `food` to `copper` after declaring the dictionary. +You should add the key `'food'` to `copper` after declaring the dictionary. ```js ({ test: () => assert.match(code, /copper\s*\[\s*("|')food\1\s*\]/) }) ``` -You should set `copper['food']` to `hay` after declaring the dictionary. +You should set `copper['food']` to `'hay'` after declaring the dictionary. ```js ({ test: () => assert.match(code, /^copper\s*\[\s*("|')food\1\s*\]\s*=\s*("|')hay\2/m) }) diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md index fcd115aa8ff..c5918f9cc3f 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md @@ -14,7 +14,13 @@ Now, at the bottom of your code, print `copper`. You should print `copper` at the bottom of your code. ```js -assert.match(code, /print\s*\(\s*copper\s*\)/) +({ test: () => + { + const commentless_code = __helpers.python.removeComments(code); + assert.match(commentless_code, /print\s*\(\s*copper\s*\)\s*$/) + } +}) + ``` # --seed-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md index 2b231ae0b9d..b475cfd6a20 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md @@ -9,14 +9,18 @@ dashedName: step-8 The same syntax can be used to change the value of an existing key. -Just before the `print()` call, access the `species` key and reassign its value to `Cavia porcellus`. +Just before the `print()` call, access the `'species'` key and reassign its value to `'Cavia porcellus'`. # --hints-- -You should reassign the `copper['species']` to the string `Cavia porcellus` before the `print()` call. +You should reassign the `copper['species']` to the string `'Cavia porcellus'` before the `print()` call. ```js -({ test: () => assert.match(code, /^copper\s*\[\s*("|')species\1\s*\]\s*=\s*("|')Cavia porcellus\2.*^print\s*\(\s*copper\s*\)/ms) }) +({ test: () => { + const commentless_code = __helpers.python.removeComments(code); + assert.match(commentless_code, /^copper\s*\[\s*("|')species\1\s*\]\s*=\s*("|')Cavia porcellus\2\s+^print\s*\(\s*copper\s*\)/m) + } +}) ``` # --seed-- diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 74c66608ec6..ac2ee344d92 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -1,31 +1,31 @@ --- id: 6579cbab9825b8170974c69a -title: Step 9 +title: Step 13 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- -You can remove a key-value pair from a dictionary by using the `del` keyword. The syntax is the following: +You can remove a key-value pair from a dictionary by using the `del` keyword: ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } del my_dict['occupation'] ``` -Just before your `print()` call, use the `del` keyword to delete the `age` key and its value from `copper`. +Just before your `for` loop, use the `del` keyword to delete the `'age'` key and its value from `copper`. # --hints-- -You should use the `del` keyword to delete `copper['age']` before the `print()` call. +You should use the `del` keyword to delete `copper['age']` before the `for` loop. ```js -({ test: () => assert.match(code, /^del\s+copper\s*\[\s*("|')age\1\s*\].*^print\s*\(\s*copper\s*\)/ms) }) +({ test: () => assert.match(code, /^del\s+copper\s*\[\s*("|')age\1\s*\].*^for\s*/ms) }) ``` # --seed-- @@ -41,6 +41,7 @@ copper = { copper['food'] = 'hay' copper['species'] = 'Cavia porcellus' -print(copper) +for i, j in copper.items(): + print(i, j) --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index f154f23a50f..aa4676d7334 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -1,22 +1,26 @@ --- id: 6579cd5f6dd62c189e53ddbb -title: Passo 10 +title: Step 14 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- -Now that you got the basic aspects of dictionaries, you can proceed to build the shortest path algorithm. +Now that you reviewed the basic aspects of dictionaries, you can proceed to build the shortest path algorithm. Delete every line of code after the declaration of the `copper` dictionary. # --hints-- -You should delete the lines after the declaration of your dictionary. +You should delete all the lines of code after the declaration of your dictionary. ```js -({ test: () => assert.isFalse( /copper\s*\[.*?\]|del|print\s*\(.*?\)/ms.test(code)) }) +({ test: () => { + const commentless_code = __helpers.python.removeComments(code); + assert.isFalse( /copper\s*\[.*?\]|del|for|print\s*\(.*?\)/ms.test(commentless_code)) + } +}) ``` # --seed-- @@ -32,6 +36,8 @@ copper = { copper['food'] = 'hay' copper['species'] = 'Cavia porcellus' del copper['age'] -print(copper) + +for i, j in copper.items(): + print(i, j) --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index 6a900a9bcbd..a4dbb22d57c 100644 --- a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -1,15 +1,19 @@ --- id: 6579dd49fa8a8e1fd06b85a9 -title: Step 11 +title: Step 15 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- -Graphs are data structures representing relations between pairs of elements. These elements, called *nodes*, can be real-life objects, entities, points in space or others. The connections between the nodes are called the *edges*. +Graphs are data structures representing relations between pairs of elements. +These elements, called *nodes*, can be real-life objects, entities, points in space or others. The connections between the nodes are called the *edges*. + +Here's a visual representation of a graph: + +a weighted graph with 6 nodes -For example, a graph can be used to represent two points in the space, `A` and `B`, connected by a path. A graph like this will be made of two nodes connected by an edge. Rename the `copper` dictionary into `my_graph`. This will represent the graph to test your algorithm. diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..6395759c284 --- /dev/null +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,70 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(runPython(` + "B" in my_graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(runPython(` + my_graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(runPython(` + "A" in my_graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(runPython(` + my_graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(runPython(` + len(my_graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/italian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 4d076a36f78..ade6f2f10a3 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: ステップ 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index e834cd69809..f20fe508564 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: ステップ 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index c17b2b195ae..dceffb4413d 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: ステップ 14 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 859546066c9..340158ed2c6 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: ステップ 15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 6c75bbcc51c..11a29c82982 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: ステップ 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index 0c1c58f073f..6b322313932 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: ステップ 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index 839610b890a..747a857e3ea 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: ステップ 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index aeef8b46b54..551521c304b 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: ステップ 21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index c95fa3c22f7..8c9e7ca46e6 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: ステップ 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index bcc686d605e..2ef3eef6594 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: ステップ 23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index d4a16ea1f68..32c5d6c74d2 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: ステップ 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index 28cd7276e9c..a6345b633a0 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: ステップ 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 9020c85cba3..90396aa611d 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: ステップ 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index d2932231b07..9581c1e42c4 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: ステップ 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index dbcf728b28c..c7076fb0be0 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: ステップ 28 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index ac62545a2fe..296e5d9393a 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: ステップ 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index 35ca9bbcb1c..dd1ae844af1 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: ステップ 30 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index 817d5f0be21..66a99bcb9e6 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: ステップ 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 95b748ad122..afd364c18a3 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: ステップ 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index e2d3b54751f..ab80cb8643d 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: ステップ 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index 52646363c30..1cd6ba704aa 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: ステップ 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index 2d321654618..5c3274234b9 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: ステップ 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index d624e2b8593..8832fc50902 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: ステップ 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index 2035d115893..7db9ef83ef5 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: ステップ 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index 27094a742cd..f3c30ede6be 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: ステップ 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index ab4f5640fd4..65d9b2e7d2c 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: ステップ 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index c29f87272e1..6bc606e9e5a 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: ステップ 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index 10bc7490fb3..e0a3c0ba195 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: ステップ 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index 7208acf8889..afc9fca05f5 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: ステップ 43 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index e2a4ee7bc18..bfbde23dc52 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: ステップ 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index 3fb9a809c15..8b397ad17d1 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: ステップ 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index 25a955b99c6..70adc79a3f4 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: ステップ 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index b0afaea910c..0516c0c692b 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: ステップ 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index 09beb121bfb..27cdbbca733 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: ステップ 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 7ce13a57003..6b03919f00b 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: ステップ 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index 220c41fd5d6..ace7cdb0639 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: ステップ 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index 585be99c330..18483590a86 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: ステップ 52 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index ae22853110d..7faf672b56e 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: ステップ 54 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index a1ac39dbc37..01848c86c30 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: ステップ 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index ba43fcc67b2..26cc66195b6 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: ステップ 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index eba1b05a5cb..2d89d968e57 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: ステップ 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index ea0cee14f67..dae7bdf5a85 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: ステップ 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index fb5fd7a04fc..502b271b313 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: ステップ 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index d4004f70b95..0672906c946 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: ステップ 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index 9b31e6d1e7b..e802c993946 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: ステップ 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index e77ddd04f25..914f38952da 100644 --- a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: ステップ 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/japanese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 69edb77063f..551c023ddd5 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: Step 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index aad91960c07..b43bacc50ce 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: Step 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 5d34b32984c..fc48bbf5d71 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: Step 14 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index dc3cf579a92..438bcfa8b5a 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: Step 15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index a33c4b2f57f..b0d8d9dadfa 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: Step 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index d36a0b80c00..4bf2bb94404 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: Step 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index f6578234e43..c70e4d9c82e 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: Step 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index 535c3dd38d1..342bbdfbfcf 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: Step 21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 85683677008..4fbef9c52a6 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: Step 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index 30203fee2b4..cf6afaacbbb 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: Step 23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index 904217952c5..1310b670853 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: Step 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index f612f5496eb..d92bf4054a7 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: Step 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 1f04bd17df0..4c578dced1b 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: Step 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index 92c06af759b..819945a8524 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: Step 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index bf817fb18b2..ed9b830d2a1 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: Step 28 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index d373bb7ee2e..10c72b10477 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: Step 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index dfa6454e4b9..c4570e0f57d 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: Step 30 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index cfa2c88c40c..b9f9bc13964 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: Step 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 96f7edcd22f..a128fbd651e 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: Step 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index 7832f5a4ed6..0a8cb3eb6f6 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: Step 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index ba5aa351ad6..6b95ac23398 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: Step 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index f412362390e..5f7b714e6ea 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: Step 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index 12646d5a2d0..6f490a11cec 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: Step 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index b671a6c9b9b..c24ca9dbef9 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: Step 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index 77e3618f948..3ec993861d9 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: Step 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index eeaad2c7d62..c306d80d669 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: Step 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index 458fb5974ef..f5d5fbe023d 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: Step 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index bb8994cb4b9..63cc27bafd8 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: Step 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index dbac5a53209..449aba1604c 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: Step 43 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index 3f8fd4bea7f..7359c29fac1 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: Step 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index 3d08d5ce21f..06218949acd 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: Step 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index 9e48d484447..9c0fa3d1bb7 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: Step 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index 63132e29106..79025848a64 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: Step 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index cbab2f3f4e2..118df416dbb 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: Step 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 9306e351052..7207360c1a4 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: Step 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index 457453481a9..ec3dbfcce24 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: Step 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index 83f8c55c5d8..1c368146851 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: Step 52 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index b81e1d856d2..3804817e326 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: Step 54 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index f7f4f834e4d..13b9659afbf 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: Step 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index fa3b90b95ea..519b3e0cb39 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: Step 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index 48faa3eba0f..0747ef8342b 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: Step 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 6a59b35a6de..025cb62eacb 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: Step 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index 71969683242..ce00e0915f5 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: Step 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 74c66608ec6..f92aa8f084b 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: Step 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index b8125ac549a..63e60b18cd7 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: Step 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index 6a900a9bcbd..4f92db821f2 100644 --- a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: Step 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/korean/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md index 84b10fb783a..08d8aceb982 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65576ff7888f9e96f52a4be1.md @@ -1,6 +1,6 @@ --- id: 65576ff7888f9e96f52a4be1 -title: Passo 2 +title: Step 2 challengeType: 20 dashedName: step-2 --- @@ -16,20 +16,11 @@ my_dict = { } ``` -Add a new key-value pair to your dictionary. Use the string `species` as the key, and the string `guinea pig` as the value. +Add a new key-value pair to your dictionary. Use the string `'species'` as the key, and the string `'guinea pig'` as the value. # --hints-- -You should add a new key-value pair to your `copper` dictionary. - -```js -({ test: () => assert(runPython(` - len(copper) == 1 - `)) -}) -``` - -You should have a `species` key with the value `guinea pig` inside your `copper` dictionary. +You should have a `'species'` key with the value `'guinea pig'` inside your `copper` dictionary. ```js ({ test: () => assert(runPython(` @@ -38,6 +29,15 @@ You should have a `species` key with the value `guinea pig` inside your `copper` }) ``` +Your `copper` dictionary should have a single key-value pair. + +```js +({ test: () => assert(runPython(` + len(copper) == 1 + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 502a697e729..c10f2283d5a 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -1,17 +1,19 @@ --- id: 6557709b0aee699a6a00528c -title: Etapa 12 +title: Step 16 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- -Now, replace the existent keys with the strings `A` and `B` — one for each node. Then, replace each value with the string representing the node connected to the key. +For example, a graph can be used to represent two points in the space, `A` and `B`, connected by a path. A graph like this will be made of two nodes connected by an edge. + +Replace the existent `'species'` key with the strings `'A'`. Then, replace the correspondent value with the string `'B'` to represent the connection between the `'A'` and `'B'` nodes. # --hints-- -Your dictionary should have an `A` key. +Your dictionary should have an `'A'` key. ```js ({ test: () => assert(runPython(` @@ -20,7 +22,7 @@ Your dictionary should have an `A` key. }) ``` -Your `A` key should have `B` as the value. +Your `'A'` key should have `'B'` as the value. ```js ({ test: () => assert(runPython(` @@ -29,24 +31,6 @@ Your `A` key should have `B` as the value. }) ``` -Your dictionary should have an `B` key. - -```js -({ test: () => assert(runPython(` - "B" in my_graph - `)) -}) -``` - -Your `B` key should have `A` as the value. - -```js -({ test: () => assert(runPython(` - my_graph["B"] == "A" - `)) -}) -``` - Your dictionary should have two keys. ```js diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index 31d22f7a1ba..7215d816254 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -1,19 +1,21 @@ --- id: 6557712d77ce2d9bd7e63afd -title: Etapa 13 +title: Step 18 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- Add another node connected to `B` to your graph and call it `C`. -Modify your existing dictionary to represent this arrangement. Use a list to represent the multiple connections of your `B` node. +Modify your existing dictionary to represent this arrangement: add another key `'C'` to `my_graph` and give it the value of the string `'B'`. + +Also, change the value of the existing `'B'` key into the list `['A', 'C']` to represent the multiple connections of your `'B'` node. # --hints-- -Your dictionary should have 3 keys — `A`, `B`, and `C`. +Your dictionary should have 3 keys — `'A'`, `'B'`, and `'C'`. ```js ({ test: () => assert(runPython(` @@ -23,7 +25,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -`my_graph["A"]` should have the `B` node as the value. +The value of `my_graph['A']` should be the string `'B'`. ```js ({ test: () => assert(runPython(` @@ -32,7 +34,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -`my_graph["B"]` should be a list. +`my_graph['B']` should be a list. ```js ({ test: () => assert(runPython(` @@ -41,7 +43,7 @@ Your dictionary should have 3 keys — `A`, `B`, and `C`. }) ``` -The value of `my_graph["B"]` should be a list containing the other two nodes. +The value of `my_graph['B']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` @@ -50,7 +52,7 @@ The value of `my_graph["B"]` should be a list containing the other two nodes. }) ``` -The value of `my_graph["C"]` should be the connected node. +The value of `my_graph['C']` should be the string `'B'`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 0430d194dfa..214acd525c5 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -1,17 +1,19 @@ --- id: 6557716aadbd2d9c42c0e69a -title: Passo 14 +title: Step 19 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- -Add one last node, `D`, which is connected with `A` and `C`. Modify your dictionary to represent this structure. Again, use a list to represent multiple connections. +Add one last node, `'D'`, which is connected with `'A'` and `'C'`. + +Modify your dictionary to represent this structure. Again, use a list to represent multiple connections. # --hints-- -Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. +Your dictionary should have 4 keys called `'A'`, `'B'`, `'C'`, and `'D'`. ```js ({ test: () => assert(runPython(` @@ -21,7 +23,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["A"]` should be a list. +`my_graph['A']` should be a list. ```js ({ test: () => assert(runPython(` @@ -30,7 +32,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["A"]` should be a list containing `B` and `D`. +`my_graph['A']` should be a list containing `'B'` and `'D'`. ```js ({ test: () => assert(runPython(` @@ -39,7 +41,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["B"]` should be a list. +`my_graph['B']` should be a list. ```js ({ test: () => assert(runPython(` @@ -48,7 +50,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["B"]` should be a list containing `A` and `C`. +`my_graph['B']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` @@ -57,7 +59,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["C"]` should be a list. +`my_graph['C']` should be a list. ```js ({ test: () => assert(runPython(` @@ -66,7 +68,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["C"]` should be a list containing `B` and `D`. +`my_graph['C']` should be a list containing `'B'` and `'D'`. ```js ({ test: () => assert(runPython(` @@ -75,7 +77,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["D"]` should be a list. +`my_graph['D']` should be a list. ```js ({ test: () => assert(runPython(` @@ -84,7 +86,7 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` -`my_graph["D"]` should be a list containing `A` and `C`. +`my_graph['D']` should be a list containing `'A'` and `'C'`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 41a7c0d4f5a..42b1e248037 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -1,8 +1,8 @@ --- id: 655771d889132f9ccd341060 -title: Passo 15 +title: Step 20 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- @@ -13,37 +13,11 @@ In your case, these weights will be the distances between each node, or point in The first element in the tuple will be the connected node, and the second element will be an integer number indicating the distance. -Modify `my_graph["A"]` into a list of tuples, considering the following distances: - -| Edge | Weight | -| ---- | ------ | -| A-B | 3 | -| B-C | 4 | -| C-D | 7 | -| D-A | 1 | +Modify `my_graph['A']` into a list of tuples, considering that the `A-B` distance is `3` and the `A-D` distance is `1`. # --hints-- -Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. - -```js -({ test: () => assert(runPython(` - key_list = ["A", "B", "C", "D"] - len(my_graph) == 4 and all(key in my_graph for key in key_list) - `)) -}) -``` - -`my_graph["A"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["A"]) is list and all(type(i) is tuple for i in my_graph["A"]) - `)) -}) -``` - -`my_graph["A"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph["A"]` should be a list containing the tuples `('B', 3)` and `('D', 1)`. ```js ({ test: () => assert(runPython(` @@ -53,6 +27,16 @@ Your dictionary should have 4 keys called `A`, `B`, `C`, and `D`. }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index bd06e5c8f30..c25039adc3f 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -1,19 +1,19 @@ --- id: 65577236b056379d5dbc7000 -title: Passo 18 +title: Step 23 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- Now you are going to start developing the algorithm to calculate the shortest path between each node in your new graph. -Declare an empty function called `shortest_path` and don't forget the `pass` keyword. +Declare an empty function called `shortest_path`. Use the `pass` keyword to fill the function body. # --hints-- -You should have a `shortest_path` function. +You should define a function named `shortest_path`. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index 0b7f27eadcd..702a4b5e6ba 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -1,8 +1,8 @@ --- id: 655773b0591c5f9f4045883e -title: 19° passo +title: Step 24 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- @@ -13,7 +13,7 @@ For that your function needs two parameters: `graph`, and `start`. Add them to y # --hints-- -Your function should accept `graph` and `start` as the parameters, in this order. +Your function should take `graph` and `start` as the parameters, in this order. ```js ({ test: () => assert(runPython(` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index 1ca3c6bc388..f2542698e74 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -1,8 +1,8 @@ --- id: 655773f8b8b5db9fc6d0ae76 -title: 20° passo +title: Step 25 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- @@ -13,28 +13,16 @@ Now, replace the `pass` keyword with a variable named `unvisited` and assign it # --hints-- -You should have a variable called `unvisited`. +You should have a variable called `unvisited` inside the `shortest_path` function. ```js -({ test: () => - { - const shortest_path = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest_path; - assert(function_body.match(/unvisited\s*=/)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").has_variable("unvisited")`)) }) ``` -Your `unvisited` variable should be an empty list. +You should assign an empty list to your `unvisited` variable. Remember to delete `pass`. ```js -({ test: () => - { - const shortest_path = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest_path; - assert(function_body.match(/unvisited\s*=\s*\[\s*\]/)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_body().is_equivalent("unvisited = []")`)) }) ``` # --seed-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index ee56b35cc6b..e8883fb7c61 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -1,13 +1,13 @@ --- id: 6557743527cb92a06417ea97 -title: Passo 21 +title: Step 26 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- -Create a `for` loop to iterate over your graph, and append each node to the `unvisited` list. +Create a `for` loop to iterate over your graph, and use the `.append()` method to add each node to the end of the `unvisited` list. # --hints-- @@ -15,9 +15,9 @@ You should create a `for` loop to iterate over `graph` inside the `shortest_path ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for\s+(\w+)\s+in\s+graph\s*:/m)); + const commentless_code = __helpers.python.removeComments(code); + const {function_body} = __helpers.python.getDef(commentless_code, "shortest_path"); + assert(function_body.match(/^\s*for\s+\w+\s+in\s+graph\s*:/m)); } }) ``` @@ -26,9 +26,12 @@ You should append each node to `unvisited` inside your `for` loop. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for\s+(\w+)\s+in\s+graph\s*:\s*^\1\1unvisited\.append\s*\(\s*\2\s*\)/m)); + const commentless_code = __helpers.python.removeComments(code); + const block_regex = /for\s+(\w+)\s+in\s+graph\s*/; + const {block_body} = __helpers.python.getBlock(commentless_code, block_regex); + const loop_condition = commentless_code.match(block_regex); + const regex = new RegExp(`^\\s+unvisited\\.append\\s*\\(\\s*${loop_condition[1]}\\s*\\)`, "m"); + assert(block_body.match(regex)); } }) ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 19a88c6c3cf..bc7c109ce87 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -1,8 +1,8 @@ --- id: 6557746aad2844a0cd864e12 -title: Passo 22 +title: Step 27 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- @@ -13,7 +13,7 @@ Before your `for` loop, create a new variable named `distances` and assign it an # --hints-- -You should have a `distances` variable. +You should have a variable named `distances`. ```js ({ test: () => { diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index 0bcd5c08deb..20194065cc5 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -1,8 +1,8 @@ --- id: 655774955b097ea14897db12 -title: Passo 23 +title: Step 28 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- @@ -17,9 +17,9 @@ You should create an `if` statement that executes when `node` is equal to `start ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1\1if\s+node\s*==\s*start\s*:/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /for\s+node\s+in\s+graph\s*/); + assert(block_body.match(/unvisited\.append\s*\(\s*node\s*\)\s*^\s+if\s+(node\s*==\s*start|start\s*==\s*node)\s*:/m)); } }) ``` @@ -28,9 +28,9 @@ Inside your new `if` statement you should assign `0` to the node in the `distanc ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1\1if\s+node\s*==\s*start\s*:\s*^\1\1\1distances\s*\[\s*node\s*\]\s*=\s*0/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+(node\s*==\s*start|start\s*==\s*node)\s*/m); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*0/m)); } }) ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index a17b991c70e..b098e869e4d 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -1,15 +1,15 @@ --- id: 655774d01daeeaa1978b99d5 -title: Passo 24 +title: Step 29 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- At the beginning, all the other nodes in the graph are considered to be at infinite distance from the source node, because the distance has not been determined yet. -Create an `else` clause and assign an infinite value to the node in the `distances` dictionary. For that, use the `float()` function with the string `inf` as argument to generate a floating point number representing the positive infinity. +Create an `else` clause and assign an infinite value to the node in the `distances` dictionary. For that, use the `float()` function with the string `'inf'` as argument to generate a floating point number representing the positive infinity. # --hints-- @@ -28,9 +28,9 @@ You should assign `float('inf')` to `distances[node]` inside your new `else` cla ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if.*:.*^\1else\s*:\s*^\1\s{4}distances\s*\[\s*node\s*\]\s*=\s*float\s*\(\s*("|')inf\2\s*\)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, "else"); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*float\s*\(\s*("|')inf\1\s*\)\s*$/)); } }) ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index 6c301417dd4..2f29188731d 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -1,8 +1,8 @@ --- id: 655775221059f5a20493d5d7 -title: Passo 25 +title: Step 30 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 34a0e32064e..a06ef5cddc1 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -1,8 +1,8 @@ --- id: 655776db1eeae0a620e42a0d -title: Passo 26 +title: Step 31 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index 967348ecba7..f5f032edcd0 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -1,8 +1,8 @@ --- id: 655777060d8ddea6741be1b1 -title: Passo 27 +title: Step 32 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- @@ -47,7 +47,7 @@ def shortest_path(graph, start): else: distances[node] = float('inf') print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index f02ce3499a0..b695c39413b 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -1,8 +1,8 @@ --- id: 65577739f57ecca6c39bb4e9 -title: Passo 28 +title: Step 33 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- @@ -51,9 +51,9 @@ my_graph = { def shortest_path(graph, start): unvisited = [] distances = {} - + print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index 7e00b428cda..58bf73655a4 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -1,8 +1,8 @@ --- id: 65577791ad8c26a7705e2919 -title: Passo 29 +title: Step 34 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- @@ -13,13 +13,15 @@ With a dictionary comprehension, you can create a dictionary starting from an ex {key: val for key in dict} ``` +In the example above, `val` is the value that `key` will have in the new dictionary, and `dict` is the existing dictionary. + You want to keep track of the paths between the starting node and each other node. After the `distances` variable, create a `paths` variable and assign it a dictionary with all the keys from `graph`. Assign an empty list to each key and use a dictionary comprehension to build your dictionary. # --hints-- -You should have a `paths` variable. +You should have a variable named `paths`. ```js ({ test: () => { @@ -34,8 +36,7 @@ Your `paths` variable should use the dictionary comprehension syntax to assign a ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; + const {function_body} = __helpers.python.getDef(code, "shortest_path"); assert(function_body.match(/^\s{4}paths\s*\=\s*\{\s*(\w+)\s*:\s*\[\s*\]\s+for\s+\1\s+in\s+graph\s*\}/m)); } }) @@ -57,9 +58,9 @@ my_graph = { def shortest_path(graph, start): unvisited = list(graph) distances = {} - + print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index 01a0c0b0c3d..787dd058d2f 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -1,8 +1,8 @@ --- id: 65577a17564ce8a8e06c1460 -title: Passo 30 +title: Step 35 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- @@ -13,7 +13,9 @@ Dictionary comprehensions support conditional `if`/`else` syntax too: {key: val_1 if condition else val_2 for key in dict} ``` -Use a dictionary comprehension to create a dictionary based in `graph` and assign it to the `distances` variable. Give the key a value of zero if the node is equal to the starting node, and infinite otherwise. Use `float('inf')` to achieve the latter. +In the example above, `dict` is the existing dictionary. When `condition` evaluates to `True`, `key` will have the value `val_1` , otherwise `val_2`. + +Use a dictionary comprehension to create a dictionary based on `graph` and assign it to the `distances` variable. Give the key a value of zero if the node is equal to the starting node, and infinite otherwise. Use `float('inf')` to achieve the latter. # --hints-- @@ -46,7 +48,7 @@ def shortest_path(graph, start): distances = {} paths = {node: [] for node in graph} print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index c18bf7f6142..1f59bb3cac3 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -1,20 +1,20 @@ --- id: 65578c17d54dfab65cd54b95 -title: Passo 31 +title: Step 36 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- Since the algorithm begins its assessment from the starting node, after creating the `paths` dictionary, you need to add the starting node to its own list in the `paths` dictionary. -Use the `append()` method to append `start` to the `paths[start]` list. +Use the `.append()` method to append `start` to the `paths[start]` list. # --hints-- -You should use the `append()` method to append `start` to `paths[start]`. +You should use the `.append()` method to append `start` to `paths[start]`. ```js ({ test: () => { @@ -41,9 +41,9 @@ def shortest_path(graph, start): unvisited = list(graph) distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} - + print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 709664f3126..77bacd43df0 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -1,8 +1,8 @@ --- id: 65578c74607d40b6d8c4757f -title: Passo 32 +title: Step 37 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- @@ -39,9 +39,9 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + print(f'Unvisited: {unvisited}\nDistances: {distances}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index 83dfe3a627f..93e13d14b83 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -1,13 +1,13 @@ --- id: 65578cb031cd93b77a285db2 -title: Passo 33 +title: Step 38 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- -Your function is going to explore all the nodes connected to the starting node. It will calculate the shortest paths for all of them. Then, it will remove the starting node from the unvisited nodes. +Your function is going to explore all the nodes connected to the starting node. It will calculate the shortest paths for all of them. Then, it will remove the starting node from the unvisited nodes. Next, the closest neighbor node will be visited and the process will be repeated until all the nodes are visited. @@ -38,9 +38,9 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index cefb453b980..d3599b7f08c 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -1,8 +1,8 @@ --- id: 65578cee7f2cb8b80127cce2 -title: Passo 34 +title: Step 39 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- @@ -15,9 +15,12 @@ You should have a `while` loop that executes while `unvisited` is not empty. Don ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1pass(?=\s*^\1print)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {function_body} = __helpers.python.getDef(commentless_code, "shortest_path"); + assert(function_body.match(/^\s+while\s+(unvisited|unvisited\s*!=\s*\[\s*\]|len\s*\(\s*unvisited\s*\)\s*(>|!=)\s*0)\s*:/m)); + const {block_body} = __helpers.python.getBlock(commentless_code, /while\s+(unvisited|unvisited\s*!=\s*\[\s*\]|len\s*\(\s*unvisited\s*\)\s*(>|!=)\s*0)\s*/); + assert(block_body.match(/\s+pass/)) + } }) ``` @@ -40,9 +43,9 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index 2c291aa13bb..2896691a3cb 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -1,8 +1,8 @@ --- id: 65578d0f6c78a0b868a43b9c -title: Passo 35 +title: Step 40 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- @@ -16,23 +16,13 @@ Remove `pass`, then create a variable called `current` and assign it `min(unvisi You should create a `current` variable in your `while` loop. ```js -({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1current\s*=/ms)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_whiles()[0].has_variable("current")`)) }) ``` -You should assign `min(unvisited)` to your `current` variable. +You should assign `min(unvisited)` to your `current` variable. Remember to delete `pass`. ```js -({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s{4})while\s+unvisited\s*:\s*^\1\1current\s*=\s*min\s*\(\s*unvisited\s*\)/ms)); - } -}) +({ test: () => assert(runPython(`_Node(_code).find_function("shortest_path").find_whiles()[0].find_bodies()[0].is_equivalent("current = min(unvisited)")`)) }) ``` # --seed-- @@ -57,7 +47,7 @@ def shortest_path(graph, start): pass --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index e511b3f820e..05bc3042843 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -1,15 +1,15 @@ --- id: 65578d4fc3afc3b8f554c882 -title: Passo 36 +title: Step 41 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- `min()` takes also a keyword-only argument. Passing a function as an additional argument to `min()`, you can modify the way the list items are compared. -The result of the line you've just written in the previous step is the node that comes first in alphabetical order. Instead you want to select the unvisited node having the smallest distance from the starting node. +The result of the line you've just written in the previous step is the node that comes first in alphabetical order. Instead you want to select the unvisited node having the smallest distance from the starting node. Pass `key=distances.get` as the second argument to your `min()` call. In this way, the comparison will take place depending on the value each `unvisited` list item has inside the `distances` dictionary. @@ -48,7 +48,7 @@ def shortest_path(graph, start): current = min(unvisited) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index 18158563cbf..3aac660e0ba 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -1,13 +1,13 @@ --- id: 65578f895f2a65ba7a916804 -title: Passo 37 +title: Step 42 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- -After the `current` variable assignment, create a `for` loop to iterate over the tuples in the `graph[current]` list. You will need two iterating variables for that. +After the `current` variable assignment, create a `for` loop to iterate over the tuples in the `graph[current]` list. You will need two iterating variables for that. Remember to use `pass` to fill the loop body. # --hints-- @@ -44,7 +44,7 @@ def shortest_path(graph, start): current = min(unvisited, key=distances.get) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index c9048a4b6d7..aff816846ec 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -1,13 +1,13 @@ --- id: 65578fcf00322dbad5dee05b -title: Passo 38 +title: Step 43 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- -Create an `if` statement to check if the distance of the neighbor node (the second item in the processed tuple) plus the distance of `current` is less than the currently known distance of the neighbor node (the first item in the processed tuple). +Create an `if` statement to check if the distance of the neighbor node (the second item in the processed tuple) plus the distance of `current` is less than the currently known distance of the neighbor node (the first item in the processed tuple). Use the `pass` keyword to temporarily fill the body of the `if`. @@ -41,7 +41,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) --fcc-editable-region-- @@ -49,7 +49,7 @@ def shortest_path(graph, start): pass --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index 2d5f0f5bd27..d2fa44585df 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -1,15 +1,15 @@ --- id: 655790d113d14dbb727eaf41 -title: Passo 40 +title: Step 45 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- Once the distance to a node is set inside the `distances` dictionary, you need to keep track of the path to that node, too. If the distance for the node in the processed tuple has been updated, the last item in its path is the node itself. -Inside your conditional, nest another `if` statement that triggers when the last element of `paths[node]` is equal to `node`. +Inside your conditional, nest another `if` statement that triggers when the last element of `paths[node]` is equal to `node`. Use `pass` to fill the `if` statement body. # --hints-- @@ -49,6 +49,6 @@ def shortest_path(graph, start): distances[node] = distance + distances[current] --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index 05bbe93b7e1..71e88436f71 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -1,8 +1,8 @@ --- id: 6557910b0ebaeebc18209e90 -title: Passo 41 +title: Step 46 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- @@ -49,7 +49,7 @@ def shortest_path(graph, start): pass --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index b4ffd9fcc5e..18b7a83beee 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -1,28 +1,37 @@ --- id: 6557913b8fe5c0bc834c9f4f -title: Passo 42 +title: Step 47 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- -Next, create an `else` statement and use the `extend()` function to add the current node path to the neighbor node path. +The `.extend()` method, allows you to add elements from an iterable to the end of a list: + +```py +my_list = ['larch', 'birch'] +tree_list = ['fir', 'redwood', 'pine'] +my_list.extend(tree_list) +print(my_list) # Output: ['larch', 'birch', 'fir', 'redwood', 'pine'] +``` + +Create an `else` clause and use the `.extend()` method to add the current node path to the neighbor node path. # --hints-- -You should create an `else` statement after your nested `if`. +You should create an `else` clause after your nested `if` statement. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if\s+paths\s*\[\s*node\s*\]\s*\[\s*-\s*1\s*\]\s*==\s*node\s*:\s*^\1(\s{4})paths\s*\[\s*node\s*\]\s*=\s*paths\s*\[\s*current\s*\]\s*^\1else\s*:/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*/); + assert(block_body.match(/^\s+else\s*:/m)); } }) ``` -You should call `extend()` on the neighbour node path passing the current node path as the argument. +You should have `paths[node].extend(paths[current])` in your `else` clause. ```js ({ test: () => { @@ -50,7 +59,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -61,7 +70,7 @@ def shortest_path(graph, start): paths[node] = paths[current] --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index 4234877e536..078f3aa7bef 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -1,17 +1,17 @@ --- id: 655791847db8a9bd0b685f40 -title: Passo 43 +title: Step 48 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- -Finally, outside the nested conditionals, append the neighbor node to its path. +Finally, below the `else` clause, append the neighbor node to its path. # --hints-- -You should append `node` to `paths[node]` just after your `else` statement. +You should append `node` to `paths[node]` just after your `else` clause. ```js ({ test: () => { @@ -51,7 +51,7 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index c1e977b3753..93aab637e14 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -1,23 +1,33 @@ --- id: 655791ae44c182bd92f31caa -title: Passo 44 +title: Step 49 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- +The `.remove()` method removes from a list the first matching element that is passed as the argument: + +```py +my_list = ['larch', 1, True, 1] +my_list.remove(1) +print(my_list) # Output: ['larch', True, 1] +``` + Terminate the `while` loop by removing the current node from the `unvisited` list. Pay attention to the indentation. # --hints-- -You should use the `remove()` function to remove the current node from `unvisited` after your `for` loop. +You should use the `.remove()` method to remove the current node from `unvisited` after your `for` loop. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)for.*:.*^\1unvisited\.remove\s*\(\s*current\s*\)/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /while\s+unvisited/); + assert(block_body.match(/^\s+unvisited\.remove\s*\(\s*current\s*\)/m)); + const {block_body: for_body} = __helpers.python.getBlock(commentless_code, /for\s+node\s*,\s*distance\s+in\s+graph\s*\[\s*current\s*\]\s*/); + assert.notMatch(for_body, /^\s+unvisited\.remove\s*\(\s*current\s*\)/m); } }) ``` @@ -52,7 +62,7 @@ def shortest_path(graph, start): paths[node].append(node) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index d57638de658..5d6f30ebda8 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -1,13 +1,13 @@ --- id: 655791e6cf5e03be3de73451 -title: Passo 45 +title: Step 50 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- -If you try to uncomment your function call, it won't work. You have a couple of bugs to fix. The first one happens because in the nested `if` you are trying to access that might not exist in your `paths` dictionary. So, you need to be sure that `paths[node]` is not empty before accessing `paths[node][-1]`. +If you try to uncomment your function call, it won't work. You have a couple of bugs to fix. The first one happens because in the nested `if` you are trying to access an element that might not exist in your `paths[node]` list. So, you need to be sure that `paths[node]` is not empty before accessing `paths[node][-1]`. Add an additional condition to your nested `if` statement to ensure that `paths[node]` is non-empty before accessing `paths[node][-1]`. @@ -41,7 +41,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -55,9 +55,9 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index bd66fd3d711..de0d71fe456 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -1,21 +1,27 @@ --- id: 65579228c669fcbebffd01d5 -title: Passo 47 +title: Step 52 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- -The other bug is subtle. When a shorter distance is found for a neighbor node, `paths[current]` gets assigned to the neighbor node path, `paths[node]`. +The other bug is subtle. When a shorter distance is found for a neighbor node, `paths[current]` gets assigned to the neighbor node path, `paths[node]`. This means both variables point to the same list. Since lists are mutable, when you append the neighbor node to its path, both `paths[node]` and `paths[current]` are modified because they are the same list. This results in wrong paths, although the distances are correct. -Fix that bug by assigning a copy of `paths[current]` to the neighbor node path. Modify the existing assignment inside your `if` block. +You can fix that bug by assigning a copy of `paths[current]` to the neighbor node path. For that you can use the slice syntax: + +```py +my_list[:] +``` + +Where `my_list` is the list you want to copy. Modify the existing `paths[node] = paths[current]` assignment inside your `if` block by slicing `paths[current]`. # --hints-- -You should use the slice syntax to assign a copy of `paths[current]` to the neighbor node path. +You should assign `paths[current][:]` to the neighbor node path. ```js ({ test: () => assert.match(code, /^(\s*)if\s+paths\s*\[\s*node\s*\]\s+and\s+paths\s*\[\s*node\s*\]\s*\[\s*-\s*1\s*\]\s*==\s*node\s*:\s*^\1\s{4}paths\s*\[\s*node\s*\]\s*=\s*paths\s*\[\s*current\s*\]\s*\[\s*::?\s*\]/ms) }) @@ -38,7 +44,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -52,9 +58,9 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index 3335dba5438..08f56f3a18b 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -1,8 +1,8 @@ --- id: 6557924d47c325bf27afbe51 -title: Passo 48 +title: Step 53 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- @@ -48,7 +48,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -60,9 +60,9 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index adea36aec54..ad534a1ed64 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -1,8 +1,8 @@ --- id: 6557927ad11e58bf8c794b25 -title: Passo 50 +title: Step 55 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- @@ -11,7 +11,7 @@ Create a `for` loop to iterate over `targets_to_print` and print the following f # --hints-- -You should create a `for` loop to iterate over `targets_to_print`. Use `node` as iteration variable. +You should create a `for` loop to iterate over `targets_to_print`. Use `node` as the loop variable. ```js ({ test: () => { @@ -51,7 +51,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index d744d06184c..5a17874324e 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -1,32 +1,32 @@ --- id: 6559d70c5161b16ff1d6530d -title: Passo 49 +title: Step 54 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- -O Python fornece uma maneira concisa de escrever as condicionais `if`/`else` usando a sintaxe ternária: +Python provides a concise way to write `if`/`else` conditionals by using the ternary syntax: ```py val_1 if condition else val_2 ``` -A expressão acima pode ser entendida como `val_1` se `condition` for verdadeira; caso contrário, `val_2`. +The expression above evaluates to `val_1` if `condition` is true, otherwise to `val_2`. -Exclua sua chamada `print` e crie uma variável chamada `targets_to_print` após o laço `while`. Use a sintaxe ternária para atribuir `[target]` à ela quando `target` for verdadeiro e `graph` quando for falso. +Delete your `print` call and create a variable called `targets_to_print` after your `while` loop. Use the ternary syntax to assign it `[target]` when `target` is truthy, and `graph` otherwise. # --hints-- -Você deve excluir a chamada de `print`. +You should delete your `print` call. ```js ({ test: () => assert.isFalse( /print\s*\(\s*f("|')Unvisited:\s*\{\s*unvisited\s*\}\\nDistances:\s\{\s*distances\s*\}\\nPaths:\s\{\s*paths\s*\}\1\s*\)/.test(code)) }) ``` -Você deve criar uma variável chamada `targets_to_print` após o laço `while`. +You should create a variable called `targets_to_print` after your `while` loop. ```js ({ test: () => { @@ -37,7 +37,7 @@ Você deve criar uma variável chamada `targets_to_print` após o laço `while`. }) ``` -Você deve usar a sintaxe ternária para atribuir `[target]` quando `target` for verdadeiro e `graph` quando for falso à variável `targets_to_print`. +You should use the ternary syntax to assign `[target]` when `target` is truthy, and `graph` otherwise to your `targets_to_print` variable. ```js ({ test: () => { @@ -65,7 +65,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -79,7 +79,7 @@ def shortest_path(graph, start, target = ''): unvisited.remove(current) --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index ff41e2ea362..bebe295c52d 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -1,19 +1,19 @@ --- id: 6559d86fe1b8947954b9178d -title: Passo 51 +title: Step 56 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- -Agora está melhor, mas você não deseja imprimir os detalhes sobre o nó inicial. +Now it's better but you don't want to print the details about the starting node. -Antes da chamada de `print`, adicione uma instrução `if` para executar quando `node` for igual a `start` e use a palavra-chave `continue` para ir para a próxima iteração do laço. +Before the `print` call, add an `if` statement to execute when `node` is equal to `start` and use the `continue` keyword to go to the next loop iteration. # --hints-- -Você deve aninhar um comando `if` para verificar que `node` é igual a `start` dentro do laço `for`. +You should nest an `if` statement to check that `node` is equal to `start` inside your `for` loop. ```js ({ test: () => { @@ -24,7 +24,7 @@ Você deve aninhar um comando `if` para verificar que `node` é igual a `start` }) ``` -Você deve usar a palavra-chave `continue` para ir para a próxima iteração dentro do novo comando`if`. +You should use the `continue` keyword to go to the next iteration inside your new `if` statement. ```js ({ test: () => { @@ -53,7 +53,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -69,7 +69,7 @@ def shortest_path(graph, start, target = ''): targets_to_print = [target] if target else graph for node in targets_to_print: print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index fdaff3e028e..a6a85e17930 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -1,17 +1,17 @@ --- id: 6559da1b7d75f088f5e6b89f -title: Passo 52 +title: Step 57 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- -Por fim, ao final da função, retorne `distances` e `paths`. +Finally, at the very end of your function, return `distances, paths`. # --hints-- -Você deve retornar `distances` e `paths` ao final da função. +You should return `distances, paths` at the bottom of your function. ```js ({ test: () => { @@ -39,7 +39,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -57,8 +57,8 @@ def shortest_path(graph, start, target = ''): if node == start: continue print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - - + + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index 27213b88ba6..b1679096f82 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -1,19 +1,19 @@ --- id: 6559da93115de78dbbdc7ba3 -title: Passo 54 +title: Step 59 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- -Como etapa final, modifique a chamada da função passando `F` como o terceiro argumento e confira a saída. +As a final step, modify your function call passing `'F'` as the third argument to print only the path from `A` to `F`. -Assim, o algoritmo de caminho mais curto está completo. +With that, the shortest path algorithm is complete. # --hints-- -Você deve chamar `shortest_path` passando `my_graph`, `'A'` e `'F'` como argumentos. +You should call `shortest_path` passing `my_graph`, `'A'` and `'F'` as the arguments. ```js ({ test: () => assert.match(code, /^shortest_path\s*\(\s*my_graph\s*,\s*("|')A\1\s*,\s*("|')F\2\s*\)/m) }) @@ -39,7 +39,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -51,15 +51,15 @@ def shortest_path(graph, start, target = ''): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + targets_to_print = [target] if target else graph for node in targets_to_print: if node == start: continue print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - + return distances, paths - + shortest_path(my_graph, 'A') --fcc-editable-region-- ``` @@ -81,7 +81,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -93,15 +93,15 @@ def shortest_path(graph, start, target = ''): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + targets_to_print = [target] if target else graph for node in targets_to_print: if node == start: continue print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - + return distances, paths - + shortest_path(my_graph, 'A', 'F') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index 8a1b607d6ef..11de998a29f 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -1,26 +1,17 @@ --- id: 6566195b0a021bb660b2b4b1 -title: Passo 16 +title: Step 21 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- -Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`. +Now modify `my_graph['B']` into a list of tuples, where the first element in the tuple is the connected node, and the second element is the distance. The `B-C` distance is `4`. # --hints-- -`my_graph["B"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["B"]) is list and all(type(i) is tuple for i in my_graph["B"]) - `)) -}) -``` - -`my_graph["B"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['B']` should be a list containing the tuples `('A', 3)` and `('C', 4)`. ```js ({ test: () => assert(runPython(` @@ -30,6 +21,16 @@ Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`. }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index b153442e99e..cd4e33e8754 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -1,8 +1,8 @@ --- id: 65661b72d6745ebec6a96923 -title: Passo 17 +title: Step 22 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- @@ -11,16 +11,7 @@ In the same way, modify the remaining two lists considering that the `C-D` dista # --hints-- -`my_graph["C"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["C"]) is list and all(type(i) is tuple for i in my_graph["C"]) - `)) -}) -``` - -`my_graph["C"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['C']` should be a list containing the tuples `('B', 4)` and `('D', 7)`. ```js ({ test: () => assert(runPython(` @@ -30,16 +21,7 @@ In the same way, modify the remaining two lists considering that the `C-D` dista }) ``` -`my_graph["D"]` should be a list of tuples. - -```js -({ test: () => assert(runPython(` - type(my_graph["D"]) is list and all(type(i) is tuple for i in my_graph["D"]) - `)) -}) -``` - -`my_graph["D"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance. +`my_graph['D']` should be a list containing the tuples `('A', 1)` and `('C', 7)`. ```js ({ test: () => assert(runPython(` @@ -49,6 +31,36 @@ In the same way, modify the remaining two lists considering that the `C-D` dista }) ``` +`my_graph` should have 4 keys named `'A'`, `'B'`, `'C'`, and `'D'`. + +```js +({ test: () => assert(runPython(` + key_list = ["A", "B", "C", "D"] + len(my_graph) == 4 and all(key in my_graph for key in key_list) + `)) +}) +``` + +`my_graph['A']` should be a list containing the tuples `('B', 3)` and `('D', 1)`. + +```js +({ test: () => assert(runPython(` + tuples = [("B", 3), ("D", 1)] + len(my_graph["A"]) == 2 and all(t in my_graph["A"] for t in tuples) + `)) +}) +``` + +`my_graph['B']` should be a list containing the tuples `('A', 3)` and `('C', 4)`. + +```js +({ test: () => assert(runPython(` + tuples = [("A", 3), ("C", 4)] + len(my_graph["B"]) == 2 and all(t in my_graph["B"] for t in tuples) + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index b2a90081317..6ddd8da7a6f 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -1,8 +1,8 @@ --- id: 6567722f53ad97d7ea6bb082 -title: Passo 46 +title: Step 51 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- @@ -34,7 +34,7 @@ def shortest_path(graph, start): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -48,9 +48,9 @@ def shortest_path(graph, start): paths[node].extend(paths[current]) paths[node].append(node) unvisited.remove(current) - + print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 613ae67cd7e..a5cae41c450 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -1,8 +1,8 @@ --- id: 65774ae7c3eee66fe79b9459 -title: Passo 53 +title: Step 58 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- @@ -35,7 +35,7 @@ You should modify `my_graph` into the provided graph. 'F': [('B', 2), ('D', 3)] } my_graph == g - + `)) }) ``` @@ -58,7 +58,7 @@ def shortest_path(graph, start, target = ''): distances = {node: 0 if node == start else float('inf') for node in graph} paths = {node: [] for node in graph} paths[start].append(start) - + while unvisited: current = min(unvisited, key=distances.get) for node, distance in graph[current]: @@ -76,7 +76,7 @@ def shortest_path(graph, start, target = ''): if node == start: continue print(f'\n{start}-{node} distance: {distances[node]}\nPath: {" -> ".join(paths[node])}') - + return distances, paths shortest_path(my_graph, 'A') diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index e99d6528b76..1612e2689fc 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -1,23 +1,25 @@ --- id: 657891ab9c1903f4e55433ba -title: Passo 39 +title: Step 44 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- +When the condition of your new `if` is true, a shorter path to the neighbor node has been found. + Inside your new `if` block, delete `pass` and reassign the neighbor node distance to the sum of the neighbor node distance plus the distance of `current`. # --hints-- -You should assign `distance + distances[current]` to the neighbor node distance inside your new `if`. +You should assign `distance + distances[current]` to `distances[node]` inside your new `if`. ```js ({ test: () => { - const shortest = __helpers.python.getDef(code, "shortest_path"); - const {function_body} = shortest; - assert(function_body.match(/^(\s*)if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*:\s*^\1\s{4}distances\s*\[\s*node\s*\]\s*=\s*distance\s*\+\s*distances\s*\[\s*current\s*\]/ms)); + const commentless_code = __helpers.python.removeComments(code); + const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+distance\s*\+\s*distances\s*\[\s*current\s*\]\s*<\s*distances\s*\[\s*node\s*\]\s*/); + assert(block_body.match(/^\s+distances\s*\[\s*node\s*\]\s*=\s*distance\s*\+\s*distances\s*\[\s*current\s*\]/)); } }) ``` @@ -48,7 +50,7 @@ def shortest_path(graph, start): pass --fcc-editable-region-- print(f'Unvisited: {unvisited}\nDistances: {distances}\nPaths: {paths}') - + #shortest_path(my_graph, 'A') ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md index 60c41843693..4124cd85e1a 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65789506b30453080f77470c.md @@ -1,6 +1,6 @@ --- id: 65789506b30453080f77470c -title: 1° passo +title: Step 1 challengeType: 20 dashedName: step-1 --- @@ -10,9 +10,9 @@ dashedName: step-1 So far, you have already met different data types: - Immutable data types, such as integers, strings, tuples, and Booleans. -- Mutable data types, such as lists. +- Mutable data types, such as lists, and dictionaries. -A dictionary is a mutable data type and it is identified by a pair of curly braces, `{}`. +A dictionary is identified by a pair of curly braces, `{}`. Start by creating a variable called `copper` and assign it an empty dictionary using a pair of curly braces, in the same way you would create an empty list with a pair of square brackets. diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md index 587fdd97181..c9e787d4914 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b13757611e2825beb8a5.md @@ -1,6 +1,6 @@ --- id: 6578b13757611e2825beb8a5 -title: Passo 3 +title: Step 3 challengeType: 20 dashedName: step-3 --- @@ -9,20 +9,11 @@ dashedName: step-3 Keys must be unique within a dictionary and they can be only immutable data types. This means you cannot use a list or another dictionary as keys. -Add another key `age` to your dictionary and give it the integer number `2` as value. +Add another key `'age'` to your dictionary and give it the integer number `2` as value. # --hints-- -You should add a new key-value pair to your `copper` dictionary. - -```js -({ test: () => assert(runPython(` - len(copper) == 2 - `)) -}) -``` - -You should have an `age` key with the value `2` just after `'species': 'guinea pig'`, inside your `copper` dictionary. Don't forget the comma. +You should have an `'age'` key with the value `2` just after `'species': 'guinea pig'`, inside your `copper` dictionary. Don't forget the comma. ```js ({ test: () => assert(runPython(` @@ -31,6 +22,15 @@ You should have an `age` key with the value `2` just after `'species': 'guinea p }) ``` +You should have two key-value pairs in your `copper` dictionary. + +```js +({ test: () => assert(runPython(` + len(copper) == 2 + `)) +}) +``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md index 67fc4be9b91..6319e57bf45 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6578b57361f2f132a02e2a18.md @@ -1,28 +1,28 @@ --- id: 6578b57361f2f132a02e2a18 -title: Passo 4 +title: Step 4 challengeType: 20 dashedName: step-4 --- # --description-- -Você pode acessar os dados armazenados em um dicionário por meio das suas chaves: +You can access the data stored in a dictionary through its keys: ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } my_dict['name'] # 'Michael' ``` -Depois do dicionário, siga o exemplo abaixo para acessar a chave `species` de `copper` e exiba o resultado. +After your dictionary, follow the example above to access the `'species'` key of `copper` and print the result. # --hints-- -Você não deve modificar seu dicionário. +You should not modify the assignment of your dictionary. ```js ({ test: () => assert(runPython(` @@ -31,13 +31,13 @@ Você não deve modificar seu dicionário. }) ``` -Você deve usar `copper['species']` para acessar o valor da chave `species`. +You should use `copper['species']` to access the value of the `'species'` key. ```js ({ test: () => assert.match(code, /copper\s*\[\s*("|')species\1\s*\]/) }) ``` -Você deve chamar `print()` passando `copper['species']` como argumento. +You should call `print()` passing `copper['species']` as argument. ```js ({ test: () => assert.match(code, /^print\s*\(\s*copper\s*\[\s*("|')species\1\s*\]\s*\)/m) }) diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65796fac81f983127558f3f4.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65796fac81f983127558f3f4.md index 281fe9ecf8d..c5dbed2495a 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65796fac81f983127558f3f4.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65796fac81f983127558f3f4.md @@ -1,6 +1,6 @@ --- id: 65796fac81f983127558f3f4 -title: Passo 5 +title: Step 5 challengeType: 20 dashedName: step-5 --- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md index e8ac53435bf..04524a61fbc 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579717f0920131304286804.md @@ -1,6 +1,6 @@ --- id: 6579717f0920131304286804 -title: 6° passo +title: Step 6 challengeType: 20 dashedName: step-6 --- @@ -12,13 +12,13 @@ To add a new key-value pair after declaring a dictionary, you can indicate the k ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } my_dict['country'] = 'Canada' ``` -Delete your `print()` call. Then, after declaring `copper`, add the key `food` to your dictionary and set its value to `hay`. +Delete your `print()` call. Then, after the `copper` declaration, add the key `'food'` to your dictionary and set its value to `'hay'`. # --hints-- @@ -28,13 +28,13 @@ You should not have `print(copper['age'])` in your code. ({ test: () => assert.notMatch(code, /^print\(\s*copper\s*\[\s*("|')age\1\s*\]\s*\)/m) }) ``` -You should add the key `food` to `copper` after declaring the dictionary. +You should add the key `'food'` to `copper` after declaring the dictionary. ```js ({ test: () => assert.match(code, /copper\s*\[\s*("|')food\1\s*\]/) }) ``` -You should set `copper['food']` to `hay` after declaring the dictionary. +You should set `copper['food']` to `'hay'` after declaring the dictionary. ```js ({ test: () => assert.match(code, /^copper\s*\[\s*("|')food\1\s*\]\s*=\s*("|')hay\2/m) }) diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md index bddb8aabfe1..c5918f9cc3f 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65797670e0c0d016f17e7660.md @@ -1,6 +1,6 @@ --- id: 65797670e0c0d016f17e7660 -title: 7° passo +title: Step 7 challengeType: 20 dashedName: step-7 --- @@ -14,7 +14,13 @@ Now, at the bottom of your code, print `copper`. You should print `copper` at the bottom of your code. ```js -assert.match(code, /print\s*\(\s*copper\s*\)/) +({ test: () => + { + const commentless_code = __helpers.python.removeComments(code); + assert.match(commentless_code, /print\s*\(\s*copper\s*\)\s*$/) + } +}) + ``` # --seed-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md index b1aca8e056e..b475cfd6a20 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579ca0923cfa7162089d2f0.md @@ -1,6 +1,6 @@ --- id: 6579ca0923cfa7162089d2f0 -title: 8° passo +title: Step 8 challengeType: 20 dashedName: step-8 --- @@ -9,14 +9,18 @@ dashedName: step-8 The same syntax can be used to change the value of an existing key. -Just before the `print()` call, access the `species` key and reassign its value to `Cavia porcellus`. +Just before the `print()` call, access the `'species'` key and reassign its value to `'Cavia porcellus'`. # --hints-- -You should reassign the `copper['species']` to the string `Cavia porcellus` before the `print()` call. +You should reassign the `copper['species']` to the string `'Cavia porcellus'` before the `print()` call. ```js -({ test: () => assert.match(code, /^copper\s*\[\s*("|')species\1\s*\]\s*=\s*("|')Cavia porcellus\2.*^print\s*\(\s*copper\s*\)/ms) }) +({ test: () => { + const commentless_code = __helpers.python.removeComments(code); + assert.match(commentless_code, /^copper\s*\[\s*("|')species\1\s*\]\s*=\s*("|')Cavia porcellus\2\s+^print\s*\(\s*copper\s*\)/m) + } +}) ``` # --seed-- diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 1145cc88df6..ac2ee344d92 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -1,31 +1,31 @@ --- id: 6579cbab9825b8170974c69a -title: 9° passo +title: Step 13 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- -You can remove a key-value pair from a dictionary by using the `del` keyword. The syntax is the following: +You can remove a key-value pair from a dictionary by using the `del` keyword: ```py my_dict = { 'name': 'Michael', - 'occupation': 'Lumberjack` + 'occupation': 'Lumberjack' } del my_dict['occupation'] ``` -Just before your `print()` call, use the `del` keyword to delete the `age` key and its value from `copper`. +Just before your `for` loop, use the `del` keyword to delete the `'age'` key and its value from `copper`. # --hints-- -You should use the `del` keyword to delete `copper['age']` before the `print()` call. +You should use the `del` keyword to delete `copper['age']` before the `for` loop. ```js -({ test: () => assert.match(code, /^del\s+copper\s*\[\s*("|')age\1\s*\].*^print\s*\(\s*copper\s*\)/ms) }) +({ test: () => assert.match(code, /^del\s+copper\s*\[\s*("|')age\1\s*\].*^for\s*/ms) }) ``` # --seed-- @@ -41,6 +41,7 @@ copper = { copper['food'] = 'hay' copper['species'] = 'Cavia porcellus' -print(copper) +for i, j in copper.items(): + print(i, j) --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index f154f23a50f..aa4676d7334 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -1,22 +1,26 @@ --- id: 6579cd5f6dd62c189e53ddbb -title: Passo 10 +title: Step 14 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- -Now that you got the basic aspects of dictionaries, you can proceed to build the shortest path algorithm. +Now that you reviewed the basic aspects of dictionaries, you can proceed to build the shortest path algorithm. Delete every line of code after the declaration of the `copper` dictionary. # --hints-- -You should delete the lines after the declaration of your dictionary. +You should delete all the lines of code after the declaration of your dictionary. ```js -({ test: () => assert.isFalse( /copper\s*\[.*?\]|del|print\s*\(.*?\)/ms.test(code)) }) +({ test: () => { + const commentless_code = __helpers.python.removeComments(code); + assert.isFalse( /copper\s*\[.*?\]|del|for|print\s*\(.*?\)/ms.test(commentless_code)) + } +}) ``` # --seed-- @@ -32,6 +36,8 @@ copper = { copper['food'] = 'hay' copper['species'] = 'Cavia porcellus' del copper['age'] -print(copper) + +for i, j in copper.items(): + print(i, j) --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index 1d703bac619..a4dbb22d57c 100644 --- a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -1,15 +1,19 @@ --- id: 6579dd49fa8a8e1fd06b85a9 -title: Passo 10 +title: Step 15 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- -Graphs are data structures representing relations between pairs of elements. These elements, called *nodes*, can be real-life objects, entities, points in space or others. The connections between the nodes are called the *edges*. +Graphs are data structures representing relations between pairs of elements. +These elements, called *nodes*, can be real-life objects, entities, points in space or others. The connections between the nodes are called the *edges*. + +Here's a visual representation of a graph: + +a weighted graph with 6 nodes -For example, a graph can be used to represent two points in the space, `A` and `B`, connected by a path. A graph like this will be made of two nodes connected by an edge. Rename the `copper` dictionary into `my_graph`. This will represent the graph to test your algorithm. diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..6395759c284 --- /dev/null +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,70 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(runPython(` + "B" in my_graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(runPython(` + my_graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(runPython(` + "A" in my_graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(runPython(` + my_graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(runPython(` + len(my_graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/portuguese/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index 054d8e89933..8fc5e03922a 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: Hatua ya 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index e36e0cbd908..21d6e9d6744 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: Hatua ya 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 02430fe11f0..826a1108102 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: Hatua ya 14 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 83afd0dd384..01e782e2868 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: Hatua ya 15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 177bcc40cc5..b526093627c 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: Hatua ya 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index ea0e221644a..03de8662479 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: Hatua ya 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index 3557a75a132..9205060c70e 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: Hatua ya 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index 33e17fe0f7e..b03dcdf43b3 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: Hatua ya 21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 0c9a594788c..6dc8577ce56 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: Hatua ya 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index e29859a2e26..e343dbbc498 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: Hatua ya 23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index b5e67a066a3..9804d813fd4 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: Hatua ya 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index 1f23f01b40d..b1b2cff5608 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: Hatua ya 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 2564ad64a96..814a750073b 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: Hatua ya 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index f1f443313d4..01e9e7ebd70 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: Hatua ya 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index 534e2a73592..7f7eb7383b6 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: Hatua ya 28 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index 24dc9c7c18f..327c8090bd2 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: Hatua ya 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index c2793e3ef44..2e0b4437420 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: Hatua ya 30 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index a40e18beb1e..0c67cb748fd 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: Hatua ya 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 12503066063..b04f4f499cb 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: Hatua ya 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index 5b7665ebc68..4ee26c3c038 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: Hatua ya 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index 0b4a943567a..70f81809999 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: Hatua ya 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index cb2073cf282..b6127670bfe 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: Hatua ya 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index 96495cf4ce1..368019e7004 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: Hatua ya 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index 34662f1f535..d17b2dfd252 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: Hatua ya 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index deba353bee2..4bc960d681a 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: Hatua ya 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index 03264980110..756c05bf913 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: Hatua ya 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index a4c168b6e0d..935455f9cd6 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: Hatua ya 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index 0c5dec196b1..6b7973ca388 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: Hatua ya 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index f8757ad0a51..ee82e9950d3 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: Hatua ya 43 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index 1715823f058..2d1352eeb8b 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: Hatua ya 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index 3dee38b71bf..f59f4fda656 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: Hatua ya 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index d5da9d7b575..7dc4e884088 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: Hatua ya 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index 07a21ad9e43..b9e8715b57f 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: Hatua ya 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index 96979ad5482..8542ecec194 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: Hatua ya 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 64a840dace9..f4a112741f4 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: Hatua ya 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index 852a588b39e..63247ee954b 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: Hatua ya 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index fb3483966c1..6f4555313cd 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: Hatua ya 52 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index 9736d4317bb..922645c77ee 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: Hatua ya 54 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index 7de21aaa90b..85dd2e694cc 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: Hatua ya 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index d772abe6dcc..076c5065e1a 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: Hatua ya 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index a281a306d58..9b7713fdb3e 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: Hatua ya 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 0bb25bb9d10..bf57180df8a 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: Hatua ya 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index 6795ac46350..c3eadbe2769 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: Hatua ya 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index ba7067b061e..c6f6b6ebc6c 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: Hatua ya 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index 84adaa4ee03..ec9ffffe075 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: Hatua ya 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index dce469a2686..dd2e72d3f31 100644 --- a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: Hatua ya 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/swahili/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md index f84d10b6a10..4c2d241cea2 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557709b0aee699a6a00528c.md @@ -2,7 +2,7 @@ id: 6557709b0aee699a6a00528c title: Крок 12 challengeType: 20 -dashedName: step-12 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md index d14b0a87454..43d496b16bd 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557712d77ce2d9bd7e63afd.md @@ -2,7 +2,7 @@ id: 6557712d77ce2d9bd7e63afd title: Крок 13 challengeType: 20 -dashedName: step-13 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md index 104a9650b7e..a0d1961ca10 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557716aadbd2d9c42c0e69a.md @@ -2,7 +2,7 @@ id: 6557716aadbd2d9c42c0e69a title: Крок 14 challengeType: 20 -dashedName: step-14 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md index 28be7ff578a..f3a95c89943 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655771d889132f9ccd341060.md @@ -2,7 +2,7 @@ id: 655771d889132f9ccd341060 title: Крок 15 challengeType: 20 -dashedName: step-15 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md index 3cecca7333d..285dde7668c 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577236b056379d5dbc7000.md @@ -2,7 +2,7 @@ id: 65577236b056379d5dbc7000 title: Крок 18 challengeType: 20 -dashedName: step-18 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md index 097f8986ed4..769d65ab354 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773b0591c5f9f4045883e.md @@ -2,7 +2,7 @@ id: 655773b0591c5f9f4045883e title: Крок 19 challengeType: 20 -dashedName: step-19 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md index dbd6a17bd1b..2979209978d 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655773f8b8b5db9fc6d0ae76.md @@ -2,7 +2,7 @@ id: 655773f8b8b5db9fc6d0ae76 title: Крок 20 challengeType: 20 -dashedName: step-20 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md index f36de5d1e0d..ab9bf053a95 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557743527cb92a06417ea97.md @@ -2,7 +2,7 @@ id: 6557743527cb92a06417ea97 title: Крок 21 challengeType: 20 -dashedName: step-21 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md index 0760912ea6b..05b6c2b32f5 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557746aad2844a0cd864e12.md @@ -2,7 +2,7 @@ id: 6557746aad2844a0cd864e12 title: Крок 22 challengeType: 20 -dashedName: step-22 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md index 32d825de872..dc0118d62ed 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774955b097ea14897db12.md @@ -2,7 +2,7 @@ id: 655774955b097ea14897db12 title: Крок 23 challengeType: 20 -dashedName: step-23 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md index 316853fff10..cc2dbbb6b21 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655774d01daeeaa1978b99d5.md @@ -2,7 +2,7 @@ id: 655774d01daeeaa1978b99d5 title: Крок 24 challengeType: 20 -dashedName: step-24 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md index 51984f41d8e..d20f79cc80c 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655775221059f5a20493d5d7.md @@ -2,7 +2,7 @@ id: 655775221059f5a20493d5d7 title: Крок 25 challengeType: 20 -dashedName: step-25 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md index 61ad92f1bec..16efaaa776d 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655776db1eeae0a620e42a0d.md @@ -2,7 +2,7 @@ id: 655776db1eeae0a620e42a0d title: Крок 26 challengeType: 20 -dashedName: step-26 +dashedName: step-31 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md index 597609056b8..6ba5ea9fd0b 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655777060d8ddea6741be1b1.md @@ -2,7 +2,7 @@ id: 655777060d8ddea6741be1b1 title: Крок 27 challengeType: 20 -dashedName: step-27 +dashedName: step-32 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md index 058eb56f0c1..473d1e8f957 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577739f57ecca6c39bb4e9.md @@ -2,7 +2,7 @@ id: 65577739f57ecca6c39bb4e9 title: Крок 28 challengeType: 20 -dashedName: step-28 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md index 0d83f75030f..76db3221275 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577791ad8c26a7705e2919.md @@ -2,7 +2,7 @@ id: 65577791ad8c26a7705e2919 title: Крок 29 challengeType: 20 -dashedName: step-29 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md index 50c3da6e06a..ab6d358441a 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65577a17564ce8a8e06c1460.md @@ -2,7 +2,7 @@ id: 65577a17564ce8a8e06c1460 title: Крок 30 challengeType: 20 -dashedName: step-30 +dashedName: step-35 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md index 17510876c75..76791e58e36 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c17d54dfab65cd54b95.md @@ -2,7 +2,7 @@ id: 65578c17d54dfab65cd54b95 title: Крок 31 challengeType: 20 -dashedName: step-31 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md index 0dc9cc3f62c..21d110ecbd6 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578c74607d40b6d8c4757f.md @@ -2,7 +2,7 @@ id: 65578c74607d40b6d8c4757f title: Крок 32 challengeType: 20 -dashedName: step-32 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md index 2e1d4d7c79f..25d482530fc 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cb031cd93b77a285db2.md @@ -2,7 +2,7 @@ id: 65578cb031cd93b77a285db2 title: Крок 33 challengeType: 20 -dashedName: step-33 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md index 89f9c9eca7a..0bf608d42d0 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578cee7f2cb8b80127cce2.md @@ -2,7 +2,7 @@ id: 65578cee7f2cb8b80127cce2 title: Крок 34 challengeType: 20 -dashedName: step-34 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md index 85619a841aa..f194594a02c 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d0f6c78a0b868a43b9c.md @@ -2,7 +2,7 @@ id: 65578d0f6c78a0b868a43b9c title: Крок 35 challengeType: 20 -dashedName: step-35 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md index 12408cb9e73..287afad0c74 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578d4fc3afc3b8f554c882.md @@ -2,7 +2,7 @@ id: 65578d4fc3afc3b8f554c882 title: Крок 36 challengeType: 20 -dashedName: step-36 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md index e51c92a02ae..496b9c58b22 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578f895f2a65ba7a916804.md @@ -2,7 +2,7 @@ id: 65578f895f2a65ba7a916804 title: Крок 37 challengeType: 20 -dashedName: step-37 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md index d31d7d71d37..54cbc3077db 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65578fcf00322dbad5dee05b.md @@ -2,7 +2,7 @@ id: 65578fcf00322dbad5dee05b title: Крок 38 challengeType: 20 -dashedName: step-38 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md index 5afadcd4b2a..cd8f3aca1e8 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655790d113d14dbb727eaf41.md @@ -2,7 +2,7 @@ id: 655790d113d14dbb727eaf41 title: Крок 40 challengeType: 20 -dashedName: step-40 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md index 276b31ca5c9..549deec5279 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557910b0ebaeebc18209e90.md @@ -2,7 +2,7 @@ id: 6557910b0ebaeebc18209e90 title: Крок 41 challengeType: 20 -dashedName: step-41 +dashedName: step-46 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md index 5b4270b491a..b72f8f8891a 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557913b8fe5c0bc834c9f4f.md @@ -2,7 +2,7 @@ id: 6557913b8fe5c0bc834c9f4f title: Крок 42 challengeType: 20 -dashedName: step-42 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md index c0b27db9945..184fb61111e 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791847db8a9bd0b685f40.md @@ -2,7 +2,7 @@ id: 655791847db8a9bd0b685f40 title: Крок 43 challengeType: 20 -dashedName: step-43 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md index 253d396f142..e0155ee0de3 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791ae44c182bd92f31caa.md @@ -2,7 +2,7 @@ id: 655791ae44c182bd92f31caa title: Крок 44 challengeType: 20 -dashedName: step-44 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md index 748227df920..aa8a171a8bf 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/655791e6cf5e03be3de73451.md @@ -2,7 +2,7 @@ id: 655791e6cf5e03be3de73451 title: Крок 45 challengeType: 20 -dashedName: step-45 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md index ebd0aec7fa9..9c851345ddd 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65579228c669fcbebffd01d5.md @@ -2,7 +2,7 @@ id: 65579228c669fcbebffd01d5 title: Крок 47 challengeType: 20 -dashedName: step-47 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md index cbf4814f77a..079998c9076 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557924d47c325bf27afbe51.md @@ -2,7 +2,7 @@ id: 6557924d47c325bf27afbe51 title: Крок 48 challengeType: 20 -dashedName: step-48 +dashedName: step-53 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md index bf245cbad6c..c23f476fdba 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6557927ad11e58bf8c794b25.md @@ -2,7 +2,7 @@ id: 6557927ad11e58bf8c794b25 title: Крок 50 challengeType: 20 -dashedName: step-50 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md index 2f148fb592e..2e5d8346536 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d70c5161b16ff1d6530d.md @@ -2,7 +2,7 @@ id: 6559d70c5161b16ff1d6530d title: Крок 49 challengeType: 20 -dashedName: step-49 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md index 1e5b18f5a4c..f2774fb686a 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559d86fe1b8947954b9178d.md @@ -2,7 +2,7 @@ id: 6559d86fe1b8947954b9178d title: Крок 51 challengeType: 20 -dashedName: step-51 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md index cd4a7371ed4..a21d099faca 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da1b7d75f088f5e6b89f.md @@ -2,7 +2,7 @@ id: 6559da1b7d75f088f5e6b89f title: Крок 52 challengeType: 20 -dashedName: step-52 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md index de22e58e273..fa0e53dbea1 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6559da93115de78dbbdc7ba3.md @@ -2,7 +2,7 @@ id: 6559da93115de78dbbdc7ba3 title: Крок 54 challengeType: 20 -dashedName: step-54 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md index 4f771557854..ba7baf594b2 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6566195b0a021bb660b2b4b1.md @@ -2,7 +2,7 @@ id: 6566195b0a021bb660b2b4b1 title: Крок 16 challengeType: 20 -dashedName: step-16 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md index 5c738431097..8e94e363c6c 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65661b72d6745ebec6a96923.md @@ -2,7 +2,7 @@ id: 65661b72d6745ebec6a96923 title: Крок 17 challengeType: 20 -dashedName: step-17 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md index cf24c65b8de..a2613436b91 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6567722f53ad97d7ea6bb082.md @@ -2,7 +2,7 @@ id: 6567722f53ad97d7ea6bb082 title: Крок 46 challengeType: 20 -dashedName: step-46 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md index 626474385bd..78f2b0d1b99 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65774ae7c3eee66fe79b9459.md @@ -2,7 +2,7 @@ id: 65774ae7c3eee66fe79b9459 title: Крок 53 challengeType: 20 -dashedName: step-53 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md index 58160e7aa06..5f5ba164e58 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/657891ab9c1903f4e55433ba.md @@ -2,7 +2,7 @@ id: 657891ab9c1903f4e55433ba title: Крок 39 challengeType: 20 -dashedName: step-39 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md index 05c02fdbdc3..56a6b88b8bf 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cbab9825b8170974c69a.md @@ -2,7 +2,7 @@ id: 6579cbab9825b8170974c69a title: Крок 9 challengeType: 20 -dashedName: step-9 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md index 4152acc18e4..0c566834f9a 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579cd5f6dd62c189e53ddbb.md @@ -2,7 +2,7 @@ id: 6579cd5f6dd62c189e53ddbb title: Крок 10 challengeType: 20 -dashedName: step-10 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md index 2c529cad61c..56140881014 100644 --- a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md @@ -2,7 +2,7 @@ id: 6579dd49fa8a8e1fd06b85a9 title: Крок 11 challengeType: 20 -dashedName: step-11 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md new file mode 100644 index 00000000000..5a3ab02ed1b --- /dev/null +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65affe602a2a828b0382a058.md @@ -0,0 +1,75 @@ +--- +id: 65affe602a2a828b0382a058 +title: Step 17 +challengeType: 20 +dashedName: step-17 +--- + +# --description-- + +Replace the `'age'` key with the string `'B'` and set its value to the string `'A'` to represent the connection between the nodes in both directions. + +# --hints-- + +Your dictionary should have a `'B'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "B" in graph + `)) +}) +``` + +Your `'B'` key should have `'A'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["B"] == "A" + `)) +}) +``` + +Your dictionary should have an `'A'` key. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + "A" in graph + `)) +}) +``` + +Your `'A'` key should have `'B'` as the value. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + graph["A"] == "B" + `)) +}) +``` + +Your dictionary should have two keys. + +```js +({ test: () => assert(__pyodide.runPython(` + graph = __locals.get("my_graph") + len(graph) == 2 + `)) +}) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +my_graph = { + 'A': 'B', + 'age': 2 +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md new file mode 100644 index 00000000000..e131047f80f --- /dev/null +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cd2b7bd9a684ccf1dc16.md @@ -0,0 +1,57 @@ +--- +id: 65b7cd2b7bd9a684ccf1dc16 +title: Step 9 +challengeType: 20 +dashedName: step-9 +--- + +# --description-- + +To iterate over the keys of a dictionary, you can simply put the dictionary into a `for` loop. The code below would print each key in the dictionary `dict`: + +```py +for i in dict: + print(i) +``` + +Replace the `print()` call with a `for` loop that iterates over `copper` and prints each key. + +# --hints-- + +You should not have `print(copper)` in your code. + +```js +({ test: () => assert.isFalse(runPython(`_Node(_code).has_call("print(copper)")`)) }) +``` + +You should create a `for` loop to iterate over the `copper` dictionary. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper")`)) }) +``` + +You should print each key of the `copper` inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print({var})") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +print(copper) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md new file mode 100644 index 00000000000..60ab0d6aada --- /dev/null +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7cf140d34058d7ea8935f.md @@ -0,0 +1,38 @@ +--- +id: 65b7cf140d34058d7ea8935f +title: Step 10 +challengeType: 20 +dashedName: step-10 +--- + +# --description-- + +If you want to iterate over the values of the dictionary keys, one way is to use the `.values()` method. + +Modify your `for` loop to iterate over `copper.values()` instead of `copper` and look at the output. + +# --hints-- + +You should modify your `for` loop to iterate over `copper.values()` instead of `copper`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper: + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md new file mode 100644 index 00000000000..276a2bae41f --- /dev/null +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d25992879698180e6a71.md @@ -0,0 +1,38 @@ +--- +id: 65b7d25992879698180e6a71 +title: Step 11 +challengeType: 20 +dashedName: step-11 +--- + +# --description-- + +Finally, if you want to be able to go through the key-value pairs, you can use the `.items()` method. + +Modify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +# --hints-- + +You should mmodify your `for` loop to iterate over `copper.items()` instead of `copper.values()`. + +```js +({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.values(): + print(i) +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md new file mode 100644 index 00000000000..f4516a135ac --- /dev/null +++ b/curriculum/challenges/ukrainian/07-scientific-computing-with-python/learn-algorithm-design-by-building-a-shortest-path-algorithm/65b7d3319ebec69b983fb91b.md @@ -0,0 +1,56 @@ +--- +id: 65b7d3319ebec69b983fb91b +title: Step 12 +challengeType: 20 +dashedName: step-12 +--- + +# --description-- + +As you can see from the output, `.items()` creates a data structures that stores each key-value pair in a distinct tuple. To iterate over the elements in those tuples you can add a second loop variable: + +```py +for i, j in dict.items(): + print(i, j) +``` + +Modify your `for` loop to take two loop variables and print both of them inside the loop body. + +# --hints-- + +You should modify your `for` loop to use two variables. + +```js +({ test: () => assert(runPython(` +import ast +var = _Node(_code).find_for_loops()[0].find_for_vars() +isinstance(var.tree, ast.Tuple) +`)) }) +``` + +You should print both loop variables inside your `for` loop. + +```js +({ test: () => assert(runPython(` +var = _Node(_code).find_for_loops()[0].find_for_vars() +_Node(_code).find_for_loops()[0].find_bodies()[0].is_equivalent(f"print{var}") +`)) }) +``` + +# --seed-- + +## --seed-contents-- + +```py +--fcc-editable-region-- +copper = { + 'species': 'guinea pig', + 'age': 2 +} +copper['food'] = 'hay' +copper['species'] = 'Cavia porcellus' + +for i in copper.items(): + print(i) +--fcc-editable-region-- +```