From 43295afc0ab88cad284e639d604f22c1e074eaa9 Mon Sep 17 00:00:00 2001 From: camperbot Date: Tue, 28 Feb 2023 21:38:50 +0530 Subject: [PATCH] chore(i18n,learn): processed translations (#49545) --- ...g-a-default-option-in-switch-statements.md | 12 ++--- .../basic-javascript/counting-cards.md | 26 +++++----- .../escape-sequences-in-strings.md | 6 ++- ...-identical-options-in-switch-statements.md | 6 +-- .../replacing-if-else-chains-with-switch.md | 18 +++---- .../return-early-pattern-for-functions.md | 10 ++-- ...returning-boolean-values-from-functions.md | 8 ++-- ...rom-many-options-with-switch-statements.md | 12 ++--- ...rest-parameter-with-function-parameters.md | 12 ++++- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../615f522dea4f776f64dc3e91.md | 2 +- .../escape-sequences-in-strings.md | 6 ++- .../replacing-if-else-chains-with-switch.md | 14 +++--- ...rest-parameter-with-function-parameters.md | 12 ++++- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../615f522dea4f776f64dc3e91.md | 2 +- .../escape-sequences-in-strings.md | 6 ++- .../replacing-if-else-chains-with-switch.md | 14 +++--- ...rest-parameter-with-function-parameters.md | 12 ++++- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../615f522dea4f776f64dc3e91.md | 2 +- .../escape-sequences-in-strings.md | 6 ++- .../replacing-if-else-chains-with-switch.md | 14 +++--- ...rest-parameter-with-function-parameters.md | 12 ++++- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../615f522dea4f776f64dc3e91.md | 2 +- .../escape-sequences-in-strings.md | 6 ++- .../replacing-if-else-chains-with-switch.md | 14 +++--- ...rest-parameter-with-function-parameters.md | 12 ++++- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../problem-286-scoring-probabilities.md | 10 ++-- ...encoding-a-simple-compression-algorithm.md | 34 ++++++------- .../problem-288-an-enormous-factorial.md | 14 +++--- .../problem-289-eulerian-cycles.md | 18 +++---- .../problem-290-digital-signature.md | 6 +-- .../problem-291-panaitopol-primes.md | 8 ++-- .../problem-292-pythagorean-polygons.md | 22 ++++----- .../problem-293-pseudo-fortunate-numbers.md | 14 +++--- ...oblem-294-sum-of-digits---experience-23.md | 14 +++--- .../problem-295-lenticular-holes.md | 28 +++++------ .../problem-297-zeckendorf-representation.md | 6 +-- .../problem-298-selective-amnesia.md | 36 +++++++------- .../problem-299-three-similar-triangles.md | 24 +++++----- .../problem-300-protein-folding.md | 24 +++++----- .../project-euler/problem-301-nim.md | 30 ++++++------ .../problem-302-strong-achilles-numbers.md | 18 +++---- ...problem-303-multiples-with-small-digits.md | 12 ++--- .../project-euler/problem-304-primonacci.md | 12 ++--- .../problem-305-reflexive-position.md | 12 ++--- .../problem-306-paper-strip-game.md | 26 +++++----- .../project-euler/problem-307-chip-defects.md | 10 ++-- ...8-an-amazing-prime-generating-automaton.md | 18 +++---- .../problem-309-integer-ladders.md | 14 +++--- .../project-euler/problem-310-nim-square.md | 14 +++--- ...em-311-biclinic-integral-quadrilaterals.md | 16 +++---- ...em-312-cyclic-paths-on-sierpiski-graphs.md | 18 +++---- .../project-euler/problem-313-sliding-game.md | 16 +++---- .../problem-314-the-mouse-on-the-moon.md | 18 +++---- .../problem-315-digital-root-clocks.md | 40 ++++++++-------- .../project-euler/problem-317-firecracker.md | 10 ++-- .../project-euler/problem-318-2011-nines.md | 18 +++---- .../problem-319-bounded-sequences.md | 16 +++---- ...-factorials-divisible-by-a-huge-integer.md | 8 ++-- .../problem-321-swapping-counters.md | 20 ++++---- ...2-binomial-coefficients-divisible-by-10.md | 10 ++-- ...itwise-or-operations-on-random-integers.md | 14 +++--- .../problem-324-building-a-tower.md | 10 ++-- .../problem-325-stone-game-ii.md | 18 +++---- .../problem-326-modulo-summations.md | 16 +++---- .../problem-327-rooms-of-doom.md | 30 ++++++------ .../problem-328-lowest-cost-search.md | 26 +++++----- .../project-euler/problem-329-prime-frog.md | 18 +++---- .../problem-330-eulers-number.md | 16 +++---- .../project-euler/problem-331-cross-flips.md | 18 +++---- .../problem-332-spherical-triangles.md | 20 ++++---- .../problem-333-special-partitions.md | 18 +++---- .../problem-472-comfortable-distance-ii.md | 26 +++++----- .../problem-473-phigital-number-base.md | 24 +++++----- .../problem-474-last-digits-of-divisors.md | 12 ++--- .../problem-475-music-festival.md | 16 +++---- .../problem-476-circle-packing-ii.md | 12 ++--- .../problem-477-number-sequence-game.md | 30 ++++++------ .../project-euler/problem-478-mixtures.md | 22 ++++----- .../problem-479-roots-on-the-rise.md | 12 ++--- .../problem-480-the-last-question.md | 24 +++++----- .../61329b210dac0b08047fd6ab.md | 2 +- .../6143610161323a081b249c19.md | 2 +- .../6145e8b5080a5f06bb0223d0.md | 16 +++---- .../6145ee65e2e1530938cb594d.md | 4 +- .../6145f8f8bcd4370f6509078e.md | 2 +- .../61488ecfd05e290b5712e6da.md | 6 +-- .../6148da157cc0bd0d06df5c0a.md | 2 +- .../6148dc095264000dce348bf5.md | 14 +++--- .../6148defa9c01520fb9d178a0.md | 6 +-- .../5f33071498eb2472b87ddee4.md | 2 +- .../5f3313e74582ad9d063e3a38.md | 10 ++-- .../5f3326b143638ee1a09ff1e3.md | 8 ++-- .../5f344f9c805cd193c33d829c.md | 8 ++-- .../5f344fbc22624a2976425065.md | 4 +- .../5f35e5c4321f818cdc4bed30.md | 8 ++-- .../5f3cade9993019e26313fa8e.md | 8 ++-- .../5f3ef6e087d56ed3ffdc36be.md | 2 +- .../5f3ef6e0b431cc215bb16f55.md | 4 +- .../5f3ef6e0e0c3feaebcf647ad.md | 8 ++-- .../5f3ef6e0eaa7da26e3d34d78.md | 8 ++-- .../5f46fc57528aa1c4b5ea7c2e.md | 2 +- .../5f769541be494f25449b292f.md | 8 ++-- .../6140de31b1f5b420410728ff.md | 2 +- .../6140df547f09402144e40b92.md | 4 +- .../6140e0d875ec16262f26432b.md | 4 +- .../6140f4b5c1555a2960de1e5f.md | 4 +- .../614100d7d335bb2a5ff74f1f.md | 4 +- .../6169ab1aaeb4cd1174def700.md | 4 +- .../6169b1357fcb701bb5efc619.md | 6 +-- .../61537485c4f2a624f18d7794.md | 2 +- .../61537bb9b1a29430ac15ad38.md | 4 +- .../61537c9eecea6a335db6da79.md | 2 +- .../6153897c27f6334716ee5abe.md | 4 +- .../615389bd81347947ea7ba896.md | 8 ++-- .../6153908a366afb4d57185c8d.md | 4 +- .../615392916d83fa4f02f7e2cf.md | 2 +- .../61539e07e7430b528fbffe21.md | 2 +- .../61539f32a206bd53ec116465.md | 2 +- .../6143a1a228f7d068ab16a130.md | 6 +-- .../6143a73279ce6369de4b9bcc.md | 4 +- .../5d822fd413a79914d39e98c9.md | 12 ++--- .../5d822fd413a79914d39e98ca.md | 12 ++--- .../5d822fd413a79914d39e98cb.md | 16 +++---- .../5d822fd413a79914d39e98cc.md | 26 +++++----- .../5d822fd413a79914d39e98cd.md | 8 ++-- .../5d822fd413a79914d39e98ce.md | 8 ++-- .../5d822fd413a79914d39e98cf.md | 10 ++-- .../5d822fd413a79914d39e98d0.md | 8 ++-- .../5d822fd413a79914d39e98d1.md | 8 ++-- .../5d822fd413a79914d39e98d2.md | 12 ++--- .../5d822fd413a79914d39e98d3.md | 2 +- .../5d822fd413a79914d39e9900.md | 2 +- .../5d822fd413a79914d39e9901.md | 4 +- .../5d822fd413a79914d39e9902.md | 2 +- .../5d822fd413a79914d39e9904.md | 6 +-- .../5d822fd413a79914d39e9905.md | 4 +- .../5d822fd413a79914d39e9906.md | 12 ++--- .../5d822fd413a79914d39e9907.md | 12 ++--- .../5d822fd413a79914d39e9908.md | 8 ++-- .../5d822fd413a79914d39e9910.md | 2 +- .../5d822fd413a79914d39e9911.md | 8 ++-- .../5d822fd413a79914d39e9912.md | 6 +-- .../5d822fd413a79914d39e9913.md | 2 +- .../5d822fd413a79914d39e9914.md | 6 +-- .../5d822fd413a79914d39e9915.md | 2 +- .../5d822fd413a79914d39e9916.md | 2 +- .../5d822fd413a79914d39e9917.md | 6 +-- .../5d822fd413a79914d39e9918.md | 6 +-- .../5d822fd413a79914d39e9919.md | 2 +- .../5d822fd413a79914d39e9920.md | 6 +-- .../5d822fd413a79914d39e9921.md | 10 ++-- .../5d822fd413a79914d39e9922.md | 10 ++-- .../5d822fd413a79914d39e9923.md | 2 +- .../5d822fd413a79914d39e9925.md | 4 +- .../5d822fd413a79914d39e9926.md | 2 +- .../5d822fd413a79914d39e9929.md | 6 +-- .../5d822fd413a79914d39e993d.md | 10 ++-- .../5d822fd413a79914d39e993e.md | 2 +- .../615f522dea4f776f64dc3e91.md | 2 +- .../assignment-with-a-returned-value.md | 4 +- .../escape-sequences-in-strings.md | 6 ++- .../replacing-if-else-chains-with-switch.md | 14 +++--- ...rest-parameter-with-function-parameters.md | 12 ++++- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../615f522dea4f776f64dc3e91.md | 2 +- .../5d5a813321b9e3db6c106a46.md | 48 +++++++++---------- .../62a240c67f3dbb1a1e6d95ee.md | 2 +- .../62a24190868ca51c0b6e83c7.md | 2 +- .../62a255dae245b52317da824a.md | 2 +- .../62a257659d0d1e2456f24ba2.md | 8 ++-- .../62a3a488b24fb32b91155d56.md | 8 ++-- .../62a3b506dbaead396f58a701.md | 14 +++--- .../62a3b79d520a7f3d0e25afd6.md | 12 ++--- .../62a3c2fccf186146b59c6e96.md | 2 +- .../62a7beb1ad61211ac153707f.md | 2 +- .../62a7bf06d2ad9d1c5024e833.md | 28 +++++------ .../62a7c071219da921758a35bb.md | 18 +++---- .../62a8a9d876b2580943ba9351.md | 6 +-- .../62a8ab0e27cbaf0b54ba8a42.md | 2 +- .../62a8b1762b7775124622e1a3.md | 2 +- .../62a8b3cc436db8139cc5fc09.md | 2 +- .../62a8b6536156c51500739b41.md | 12 ++--- .../62a8b711ab7a12161c7d9b67.md | 8 ++-- .../62a8c151b23bf21bc7c4fcba.md | 2 +- .../62a8c465fa7b0c252f4a8f0c.md | 10 ++-- .../62a8c5db7888af27af23f0dd.md | 2 +- .../62a8c8cee8e5cf2e001789b4.md | 2 +- .../62a8cce1b0c32c33017cf2e9.md | 2 +- .../62a8d0337d7c67377a4a76c6.md | 10 ++-- .../62a8d143f2a58e3b6d6e9c33.md | 6 +-- .../62a8d1c72e8bb13c2074d93c.md | 6 +-- .../62a8d24c97461b3ddb9397c8.md | 12 ++--- .../62a8dfcf7fb1044d2f478fd1.md | 2 +- .../62a8e21398ad61520edb724f.md | 2 +- .../62a8e271f8e3d1541f9624ad.md | 2 +- .../62a8e4dc6a60f85bf256a0cb.md | 2 +- .../62a8eff21c0b0f6ebe5b8e38.md | 16 +++---- .../62a8f06fb318666fef69f91e.md | 6 +-- .../62a8f14fe6d1fc72454648c7.md | 10 ++-- .../62a8f256b813a476cae51f49.md | 2 +- .../62aa1fed3d4e873366ff3131.md | 2 +- .../62aa20e9cf1be9358f5aceae.md | 2 +- .../62aa21971e3b743844849985.md | 6 +-- .../62fc211760bfc220f4734800.md | 6 +-- .../escape-sequences-in-strings.md | 6 ++- .../replacing-if-else-chains-with-switch.md | 14 +++--- ...rest-parameter-with-function-parameters.md | 12 ++++- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../615f522dea4f776f64dc3e91.md | 2 +- .../assignment-with-a-returned-value.md | 4 +- .../escape-sequences-in-strings.md | 6 ++- .../replacing-if-else-chains-with-switch.md | 14 +++--- ...rest-parameter-with-function-parameters.md | 12 ++++- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../60f805f813eaf2049bc2ceea.md | 4 +- .../615f522dea4f776f64dc3e91.md | 2 +- .../5d5a813321b9e3db6c106a46.md | 48 +++++++++---------- .../62a240c67f3dbb1a1e6d95ee.md | 2 +- .../62a24190868ca51c0b6e83c7.md | 2 +- .../62a255dae245b52317da824a.md | 2 +- .../62a257659d0d1e2456f24ba2.md | 8 ++-- .../62a3a488b24fb32b91155d56.md | 8 ++-- .../62a3b506dbaead396f58a701.md | 14 +++--- .../62a3b79d520a7f3d0e25afd6.md | 12 ++--- .../62a3c2fccf186146b59c6e96.md | 2 +- .../62a7beb1ad61211ac153707f.md | 2 +- .../62a7bf06d2ad9d1c5024e833.md | 28 +++++------ .../62a7c071219da921758a35bb.md | 18 +++---- .../62a8a9d876b2580943ba9351.md | 6 +-- .../62a8ab0e27cbaf0b54ba8a42.md | 2 +- .../62a8b1762b7775124622e1a3.md | 2 +- .../62a8b3cc436db8139cc5fc09.md | 2 +- .../62a8b6536156c51500739b41.md | 12 ++--- .../62a8b711ab7a12161c7d9b67.md | 8 ++-- .../62a8c151b23bf21bc7c4fcba.md | 2 +- .../62a8c465fa7b0c252f4a8f0c.md | 10 ++-- .../62a8c5db7888af27af23f0dd.md | 2 +- .../62a8c8cee8e5cf2e001789b4.md | 2 +- .../62a8cce1b0c32c33017cf2e9.md | 2 +- .../62a8d0337d7c67377a4a76c6.md | 10 ++-- .../62a8d143f2a58e3b6d6e9c33.md | 6 +-- .../62a8d1c72e8bb13c2074d93c.md | 6 +-- .../62a8d24c97461b3ddb9397c8.md | 12 ++--- .../62a8dfcf7fb1044d2f478fd1.md | 2 +- .../62a8e21398ad61520edb724f.md | 2 +- .../62a8e271f8e3d1541f9624ad.md | 2 +- .../62a8e4dc6a60f85bf256a0cb.md | 2 +- .../62a8eff21c0b0f6ebe5b8e38.md | 16 +++---- .../62a8f06fb318666fef69f91e.md | 6 +-- .../62a8f14fe6d1fc72454648c7.md | 10 ++-- .../62a8f256b813a476cae51f49.md | 2 +- .../62aa1fed3d4e873366ff3131.md | 2 +- .../62aa20e9cf1be9358f5aceae.md | 2 +- .../62aa21971e3b743844849985.md | 6 +-- .../62fc211760bfc220f4734800.md | 6 +-- ...ss-property-names-with-bracket-notation.md | 2 +- .../assignment-with-a-returned-value.md | 4 +- .../escape-sequences-in-strings.md | 6 ++- ...sing-values-to-functions-with-arguments.md | 2 +- .../replacing-if-else-chains-with-switch.md | 14 +++--- ...the-wrong-order-when-calling-a-function.md | 10 ++-- ...osing-parenthesis-after-a-function-call.md | 10 ++-- ...h-off-by-one-errors-when-using-indexing.md | 14 +++--- ...e-loops-with-a-valid-terminal-condition.md | 10 ++-- ...-reinitializing-variables-inside-a-loop.md | 12 ++--- ...rest-parameter-with-function-parameters.md | 12 ++++- .../sum-all-odd-fibonacci-numbers.md | 2 +- .../create-a-method-on-an-object.md | 2 +- ...ype-properties-to-reduce-duplicate-code.md | 2 +- .../reuse-patterns-using-capture-groups.md | 4 +- .../extract-state-logic-to-redux.md | 2 +- .../react-and-redux/map-dispatch-to-props.md | 2 +- .../react-and-redux/map-state-to-props.md | 2 +- .../mongodb-and-mongoose/create-a-model.md | 14 ++---- .../find-the-symmetric-difference.md | 12 ++--- .../algorithms/implement-binary-search.md | 14 +++--- .../algorithms/implement-bubble-sort.md | 4 +- .../algorithms/implement-insertion-sort.md | 2 +- .../algorithms/implement-merge-sort.md | 6 +-- .../algorithms/implement-quick-sort.md | 6 +-- .../algorithms/no-repeats-please.md | 4 +- .../615f522dea4f776f64dc3e91.md | 2 +- .../5d5a813321b9e3db6c106a46.md | 48 +++++++++---------- .../62a240c67f3dbb1a1e6d95ee.md | 2 +- .../62a24190868ca51c0b6e83c7.md | 2 +- .../62a255dae245b52317da824a.md | 2 +- .../62a257659d0d1e2456f24ba2.md | 8 ++-- .../62a3a488b24fb32b91155d56.md | 8 ++-- .../62a3b506dbaead396f58a701.md | 14 +++--- .../62a3b79d520a7f3d0e25afd6.md | 14 +++--- .../62a3c2fccf186146b59c6e96.md | 2 +- .../62a3c668afc43b4a134cca81.md | 4 +- .../62a7beb1ad61211ac153707f.md | 2 +- .../62a7bf06d2ad9d1c5024e833.md | 28 +++++------ .../62a7c071219da921758a35bb.md | 18 +++---- .../62a8a9d876b2580943ba9351.md | 6 +-- .../62a8ab0e27cbaf0b54ba8a42.md | 2 +- .../62a8b1762b7775124622e1a3.md | 2 +- .../62a8b3cc436db8139cc5fc09.md | 2 +- .../62a8b6536156c51500739b41.md | 12 ++--- .../62a8b711ab7a12161c7d9b67.md | 8 ++-- .../62a8c151b23bf21bc7c4fcba.md | 2 +- .../62a8c465fa7b0c252f4a8f0c.md | 10 ++-- .../62a8c5db7888af27af23f0dd.md | 2 +- .../62a8c8cee8e5cf2e001789b4.md | 2 +- .../62a8cce1b0c32c33017cf2e9.md | 2 +- .../62a8d0337d7c67377a4a76c6.md | 10 ++-- .../62a8d143f2a58e3b6d6e9c33.md | 6 +-- .../62a8d1c72e8bb13c2074d93c.md | 6 +-- .../62a8d24c97461b3ddb9397c8.md | 12 ++--- .../62a8dfcf7fb1044d2f478fd1.md | 2 +- .../62a8e21398ad61520edb724f.md | 2 +- .../62a8e271f8e3d1541f9624ad.md | 2 +- .../62a8e4dc6a60f85bf256a0cb.md | 2 +- .../62a8eff21c0b0f6ebe5b8e38.md | 16 +++---- .../62a8f06fb318666fef69f91e.md | 6 +-- .../62a8f14fe6d1fc72454648c7.md | 10 ++-- .../62a8f256b813a476cae51f49.md | 2 +- .../62aa1fed3d4e873366ff3131.md | 2 +- .../62aa20e9cf1be9358f5aceae.md | 2 +- .../62aa21971e3b743844849985.md | 6 +-- .../62fc211760bfc220f4734800.md | 6 +-- 335 files changed, 1536 insertions(+), 1464 deletions(-) diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/adding-a-default-option-in-switch-statements.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/adding-a-default-option-in-switch-statements.md index d72ac1e7b41..c43b833a4fc 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/adding-a-default-option-in-switch-statements.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/adding-a-default-option-in-switch-statements.md @@ -9,7 +9,7 @@ dashedName: adding-a-default-option-in-switch-statements # --description-- -في عبارة `switch` قد لا تكون قادراً على تحديد جميع القيم المحتملة كعبارات `case`. بدلاً من ذلك، يمكنك إضافة عبارة `default` التي سيتم تنفيذها إذا لم يتم العثور على عبارات `case` مطابقة. فكر بالأمر مثل العبارة `else` في `if/else`. +في عبارة `switch` قد لا تكون قادراً على تحديد جميع القيم المحتملة كعبارات `case`. بدلاً من ذلك، يمكنك إضافة عبارة `default` التي سيتم تنفيذها إذا لم يتم العثور على عبارات `case` مطابقة. وكأنها مثل آخر عبارة `else` في `if/else`. يجب أن تكون عبارة `default` آخر حالة. @@ -38,31 +38,31 @@ switch (num) { # --hints-- -`switchOfStuff("a")` يجب أن يعيد مقطع نصي (string) باسم `apple` +يجب أن ينتج `switchOfStuff("a")` مقطع نصي (string) بقيمة `apple` ```js assert(switchOfStuff('a') === 'apple'); ``` -`switchOfStuff("b")` يجب أن ينتج مقطع نصي (string) باسم `bird` +يجب أن ينتج `switchOfStuff("b")` مقطع نصي بقيمة `bird` ```js assert(switchOfStuff('b') === 'bird'); ``` -`switchOfStuff("c")` يجب أن ينتج مقطع نصي (string) باسم `cat` +يجب أن ينتج `switchOfStuff("c")` مقطع نصي بقيمة `cat` ```js assert(switchOfStuff('c') === 'cat'); ``` -`switchOfStuff("d")` يجب أن ينتج مقطع نصي (string) باسم `stuff` +يجب أن ينتج `switchOfStuff("d")`مقطع نصي بقيمة `stuff` ```js assert(switchOfStuff('d') === 'stuff'); ``` -`switchOfStuff(4)` يجب أن ينتج مقطع نصي (string) باسم `stuff` +يجب أن ينتج `switchOfStuff(4)` مقطع نصي بقيمة `stuff` ```js assert(switchOfStuff(4) === 'stuff'); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.md index 91e38532928..0a7efac2579 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.md @@ -1,6 +1,6 @@ --- id: 565bbe00e9cc8ac0725390f4 -title: عدد الأوراق (Counting Cards) +title: عد أوراق اللعب challengeType: 1 videoUrl: 'https://scrimba.com/c/c6KE7ty' forumTopicId: 16809 @@ -9,23 +9,23 @@ dashedName: counting-cards # --description-- -في لُعْبَة النادي بلاك جاك، يمكن للاعب أن يحدد ما إذا كان يتمتع بميزة على المنزل بواسطة تتبع العدد النسبي للبطاقات المرتفعة والمنخفضة المتبقية في مجموعة الورق. هذا يسمى إحصاء الورق (Card Counting). +في لُعْبَة بلاك جاك (blackjack)، يمكن للاعب أن يحدد ما إذا كان يتمتع بميزة على اللاعب الموزِّع بواسطة تتبع العدد النسبي للأوراق المرتفعة والمنخفضة المتبقية في مجموعة الورق. هذا يسمى إحصاء الورق (Card Counting). -يكون وجود المزيد من الورق عالي القيمة المتبقي في المجموعة, أفضل للاعب. يتم تعيين قيمة لكل بطاقة وفقاً للجدول بالأدنى. عندما يكون العد موجبًا، يجب على اللاعب المراهنة بشكل مرتفع. عندما يكون العد صفرًا أو سلبيًا، يجب أن يراهن اللاعب على انخفاض. +يكون وجود المزيد من الورق عالي القيمة المتبقي في المجموعة, أفضل للاعب. يتم تعيين قيمة لكل ورقة لعب وفقاً للجدول بالأدنى. عندما يكون العد موجبًا، يجب على اللاعب المراهنة بشكل مرتفع. عندما يكون العد صفرًا أو سلبيًا، يجب أن يراهن اللاعب بشكل منخفض.
تغيير العدالأوراق
+12, 3, 4, 5, 6
07, 8, 9
-110, 'J', 'Q', 'K', 'A'
-سوف تكتب وظيفة لعد الورق. سوف يتلقى الوسيط (parameter) المسمى `card`, الذي يمكن أن يكون رقما أو مقطع نصي (string)، ويزيد أو يخفض متغير `count` وفقا لقيمة الورقة (انظر إلى الجدول). ثم ستقوم الوظيفة (function) بإنشاء مقطع (string) يحتوي علي العد الحالي والمقطع `Bet` إذا كان العد إيجابياً، أو `Hold` إذا كان العد صفر أو سلبي. يجب أن يفصل العد الحالي وقرار اللاعب (`Bet` أو `Hold`) بمسافة واحدة. +سوف تكتب وظيفة لعد الورق. سوف تتلقى وسيط (parameter) اسمه `card`, الذي يمكن أن يكون رقما أو مقطع نصي (string)، وسوف تزيد أو تخفض متغير `count` وفقا لقيمة الورقة المعطى (انظر إلى الجدول). ثم ستقوم الوظيفة بإنشاء مقطع نصي يحتوي علي العد الحالي وكلمة `Bet` إذا كان العد إيجابياً، أو `Hold` إذا كان العد صفر أو سلبي. يجب أن يفصل العد الحالي وقرار اللاعب (`Bet` أو `Hold`) بمسافة فارعة واحدة. **مثال على النتائج:** كالآتي `-3 Hold` أو `5 Bet` **تلميح** -لا تعيد تعيين `count` إلى 0 عندما تكون القيمة 7 أو 8 أو 9. لا بإنشاء قائمة. +لا تعيد تعيين `count` إلى 0 عندما تكون القيمة 7 أو 8 أو 9. لا تنتج قائمة (array(. لا تتضمن الاقتباسات (واحدة أو مزدوجة) في الإخراج. # --hints-- -يجب أن تعيد وظيفتك قيمة للعدد والنص (`Bet` أو `Hold`) مع حرف فارغ واحد بينهما. +يجب أن تنتج وظيفتك قيمة العدد والنص (`Bet` أو `Hold`) مع حرف فارغ واحد بينهما. ```js assert(// @@ -38,7 +38,7 @@ assert(// ); ``` -يجب أن ينتج تسلسل الورق 2، 3، 4، 5، 6 المقطع `5 Bet` +إن أعطيَ الورق 2، 3، 4، 5، 6 بالتسلسل، يجب أن تنتج المقطع `5 Bet` ```js assert( @@ -57,7 +57,7 @@ assert( ); ``` -يجب أن ينتج تسلسل الورق 7، 8، 9 المقطع `0 Hold` +إن أعطيَ الورق 7, 8, 9 بالتسلسل، يجب أن تنتج المقطع `0 Hold` ```js assert( @@ -74,7 +74,7 @@ assert( ); ``` -يجب أن ينتج تسلسل الورق 10, J, Q, K, A المقطع `-5 Hold` +إن أعطيَ الورق 10, J, Q, K, A بالتسلسل، يجب أن تنتج المقطع `-5 Hold` ```js assert( @@ -93,7 +93,7 @@ assert( ); ``` -يجب أن ينتج تسلسل الورق 3, 7, Q, 8, A المقطع `-1 Hold` +إن أعطيَ الورق 3, 7, Q, 8, A بالتسلسل، يجب أن تنتج المقطع `-1 Hold` ```js assert( @@ -112,7 +112,7 @@ assert( ); ``` -يجب أن ينتج تسلسل الورق 2, J, 9, 2, 7 المقطع `1 Bet` +إن أعطيَ الورق 2, J, 9, 2, 7 بالتسلسل، يجب أن تنتج المقطع `1 Bet` ```js assert( @@ -131,7 +131,7 @@ assert( ); ``` -يجب أن ينتج تسلسل الورق 2، 2، 10 المقطع `1 Bet` +إن أعطيَ الورق 2، 2، 10 بالتسلسل، يجب أن تنتج المقطع `1 Bet` ```js assert( @@ -148,7 +148,7 @@ assert( ); ``` -يجب أن ينتج تسلسل الورق 3, 2, A, 10, K المقطع `-1 Hold` +إن أعطيَ الورق 3, 2, A, 10, K بالتسلسل، يجب أن تنتج المقطع `-1 Hold` ```js assert( diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index 145e6b9ff6f..0d97aebbc56 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ dashedName: escape-sequences-in-strings عيّن المقاطع الثلاثة في السطور التالية في المتغير الوحيد `myStr` باستخدام تسلسلات التخريج (escape sequences). -
FirstLine
    \SecondLine
ThirdLine
+
+FirstLine
+    \SecondLine
+ThirdLine
+
سوف تحتاج إلى استخدام تسلسلات التخريج لإدراج الرموز الخاصة (special characters) بشكل صحيح. ستحتاج أيضًا إلى اتباع التباعد كما هو موضح أعلاه، دون مسافات بين تسلسلات التخريج escape sequences أو الكلمات. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md index 2d4e56080b1..206ad63798b 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244df -title: خيرات عدّة متشابهة في تعبيرات Switch +title: عدّة خيرات متشابهة في تعبيرات switch challengeType: 1 videoUrl: 'https://scrimba.com/c/cdBKWCV' forumTopicId: 18242 @@ -9,7 +9,7 @@ dashedName: multiple-identical-options-in-switch-statements # --description-- -إذا تم حذف عبارات `break` من عبارات `switch` لكل `case`، سيتم تنفيذ عبارات `case` التالية حتى تقابلهم عبارة `break`. إذا كان لديك مدخلات متعددة بنفس المخرج، يمكنك تمثيلها في عبارة `switch`, أليك مثال: +إذا تم حذف عبارة `break` من عبارة `switch` في أي `case`، سيتم تنفيذ عبارات `case` التالية حتى مقابلة عبارة `break`. إذا كان لديك مدخلات متعددة بنفس المخرج، يمكنك تمثيلها في عبارة `switch`, أليك مثال: ```js let result = ""; @@ -97,7 +97,7 @@ assert(sequentialSizes(9) === 'High'); assert(!/else/g.test(code) || !/if/g.test(code)); ``` -يجب أن يكون لديك تسع `case` +يجب أن يكون لديك تسع عبارات `case` ```js assert(code.match(/case/g).length === 9); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index 6b117f568ad..217fd1f8388 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244e0 -title: استبدال If Else Chains بـ Switch +title: استبدال عبارات if/else المتسلسلة بعبارة switch challengeType: 1 videoUrl: 'https://scrimba.com/c/c3JE8fy' forumTopicId: 18266 @@ -9,7 +9,7 @@ dashedName: replacing-if-else-chains-with-switch # --description-- -إذا كان لديك العديد من الخيارات للاختيار منها، `switch` يمكن أن يكون أسهل في الكتابة من الكثير من `if`/`else if`. ما يلي: +إذا كان لديك العديد من الخيارات التي يجب الاختيار بينها، عبارة `switch` قد تكون أسهل في الكتابة من سلسلة طويلة من عبارات `if`/`else if`. التالي: ```js if (val === 1) { @@ -60,43 +60,43 @@ assert(!/if/g.test(code)); assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` يجب أن تساوي الـ string الآتي `Marley` +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` يجب أن تساوي الـ string الآتي `The Answer` +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` يجب أن تساوي الـ string الآتي `There is no #1` +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)` يجب أن تساوي الـ string الآتي `Missed me by this much!` +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` يجب أن تساوي الـ string الآتي `Ate Nine` +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` يجب أن يكون `""` (string فارغ) +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` يجب أن يكون `""` (string فارغ) +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md index 7aec83fa65f..539f83d2e52 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244c4 -title: نمط الإنشاء المبكر للوظائف (Return Early Pattern for Functions) +title: نمط return المبكر للوظائف challengeType: 1 videoUrl: 'https://scrimba.com/c/cQe39Sq' forumTopicId: 18272 @@ -9,7 +9,7 @@ dashedName: return-early-pattern-for-functions # --description-- -عندما يتم الوصول إلى `return`، يتوقف تنفيذ الوظيفة الحالي ويعود التحكم إلى مكان الاستدعاء. +عندما يتم الوصول إلى عبارة `return`، يتوقف تنفيذ الوظيفة الحالية ويعود التحكم إلى مكان الاستدعاء. **مثال** @@ -22,14 +22,14 @@ function myFun() { myFun(); ``` -سيتم عرض مقطع `Hello` في وحدة التحكم، وإنشاء مقطع `World`. لن يعرض مقطع `byebye` في وحدة التحكم أبدا، لأن الوظيفة تنتج عند `return`. +سيتم عرض مقطع `Hello` في وحدة التحكم، وإنشاء مقطع `World`. لن يعرض المقطع `byebye` في وحدة التحكم أبدا، لأن الوظيفة تنتهي عند عبارة `return`. # --instructions-- -عدّل الوظيفة `abTest` بحيث إذا كان `a` أو `b` أقل من `0` ستنتج الوظيفة قيمة `undefined` فوراً. +عدّل الوظيفة `abTest` بحيث إذا كان `a` أو `b` أقل من `0` ستنتهي الوظيفة مع إنتاج قيمة `undefined` فوراً. **تلميح** -تذكر أن تكون undefined مصطلح وليست مقطع نصي. +تذكر أن undefined مصطلح وليست مقطع نصي. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.md index ade4664fcdc..54bde000220 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.md @@ -1,6 +1,6 @@ --- id: 5679ceb97cbaa8c51670a16b -title: عودة القيم المنطقية من الوظيفة (Returning Boolean Values from Functions) +title: إنتاج القيم المنطقية من الوظائف challengeType: 1 videoUrl: 'https://scrimba.com/c/cp62qAQ' forumTopicId: 18273 @@ -9,7 +9,7 @@ dashedName: returning-boolean-values-from-functions # --description-- -قد تتذكر من المقارنات باستخدام عملية المساواة (==) أن جميع مشغلي المقارنات يرجعون حالة منطقية (boolean) سواء `true` أو `false`. +قد تتذكر من المقارنة باستخدام مشغِّل المساواة (==) أن جميع مشغلي المقارنات ينتجون قيمة منطقية (boolean) سواء `true` أو `false`. في بعض الأحيان يستخدم الناس `if/else` لإجراء المقارنة، مثلا: @@ -37,13 +37,13 @@ function isEqual(a, b) { # --hints-- -يجب أن يرجع `isLess(10, 15)` حالة `true` +يجب أن ينتج `isLess(10, 15)` حالة `true` ```js assert(isLess(10, 15) === true); ``` -يجب أن يرجع `isLess(15, 10)` حالة `false` +يجب أن ينتج `isLess(15, 10)` حالة `false` ```js assert(isLess(15, 10) === false); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md index ea7849ad843..eba64382647 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md @@ -24,11 +24,11 @@ switch (lowercaseLetter) { } ``` -يتم اختبار قيم `case` مساواة تامة strict equality (`===`). كلمة `break` تخبر JavaScript بالتوقف عن تنفيذ العبارات. إذا تم حذف كلمة `break`, سيتم تنفيذ العبارة التالية. +تستخدم اختبارات القيم في `case` المساواة الصارمة (`===`). كلمة `break` تخبر JavaScript بالتوقف عن تنفيذ العبارات. إذا تم حذف كلمة `break`, سيتم تنفيذ العبارة التالية. # --instructions-- -اكتب عبارة switch تختبر `val` وتعين `answer` للشروط التالية: +اكتب عبارة switch لتختبر قيمة `val` وتعين المتغير `answer` للشروط التالية: `1` - `alpha` `2` - `beta` `3` - `gamma` @@ -36,25 +36,25 @@ switch (lowercaseLetter) { # --hints-- -`caseInSwitch(1)` يجب أن يكون له قيمة المقطع (string) النصي `alpha` +`caseInSwitch(1)` يجب أن يكون له قيمة المقطع النصي (string) `alpha` ```js assert(caseInSwitch(1) === 'alpha'); ``` -`caseInSwitch(2)` يجب أن يكون له قيمة المقطع (string) النصي `beta` +`caseInSwitch(2)` يجب أن يكون له قيمة المقطع النصي `beta` ```js assert(caseInSwitch(2) === 'beta'); ``` -`caseInSwitch(3)` يجب أن يكون له قيمة المقطع (string) النصي `gamma` +`caseInSwitch(3)` يجب أن يكون له قيمة المقطع النصي `gamma` ```js assert(caseInSwitch(3) === 'gamma'); ``` -`caseInSwitch(4)` يجب أن يكون له قيمة المقطع (string) النصي `delta` +`caseInSwitch(4)` يجب أن يكون له قيمة المقطع النصي `delta` ```js assert(caseInSwitch(4) === 'delta'); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index 270007a19fc..35f80e2f6c1 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index 8a20ad37792..901ca5d06ca 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -بما أن جميع ال instances تحتوي تلقائياً على الخصائص في الـ `prototype`، فكر في `prototype` كـ "وصفة" لإنشاء الـ objects. لاحظ أن الـ `prototype` لـ `duck` و `canary` هو جزء من constructor الـ`Bird` كـ `Bird.prototype`. كل object تقريبا في جافا سكريبت لديه خاصية `prototype` التي هي جزء من الـ constructor function التي أنشأتها. +بما أن جميع ال instances تحتوي تلقائياً على الخصائص في الـ `prototype`، فكر في `prototype` كـ "وصفة" لإنشاء الـ objects. لاحظ أن الـ `prototype` لـ `duck` و `canary` هو جزء من constructor الـ`Bird` كـ `Bird.prototype`. # --instructions-- diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index 443db8e5930..e780792d7fe 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -Create a person schema called `personSchema` having this prototype: +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` Use the Mongoose basic schema types. If you want you can also add more fields, use simple validators like required or unique, and set default values. See our Mongoose article. -Now, create a model called `Person` from the `personSchema`. +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 6fd66331f79..f54467bd43b 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 وحدة `rem` تعني `root em`، وهي تتعلق بحجم الخط (font size) لعنصر `html`. -أنشئ منتقي `.small-text` وعين `font-size` بقيمة `0.85rem`، التي ستحسب على أنها تقريبا `13.6px` (تذكر أنك تعيين `html` ليحتوي على `font-size` بقيمة `16px`). +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index 461fb388bf7..5f9310c609c 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ dashedName: escape-sequences-in-strings 使用轉義字符把下面三行文本賦值給一個變量 `myStr`。 -
FirstLine
    \SecondLine
ThirdLine
+
+FirstLine
+    \SecondLine
+ThirdLine
+
你需要使用轉義字符正確地插入特殊字符。 你也需要確保間距與上面文本一致,並且單詞或轉義字符之間沒有空格。 diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index a1de91ea11c..68016587e78 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -60,43 +60,43 @@ assert(!/if/g.test(code)); assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` 應該是字符串 `Marley` +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` 應該是字符串 `The Answer` +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` 應該是字符串 `There is no #1` +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)`應該爲 `Missed me by this much!`。 +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` 應該是字符串 `Ate Nine` +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` 應該爲 `""` (empty string)。 +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` 應該爲 `""` (empty string)。 +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index 84f1103b65a..5acd5eff0a3 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index ea3538d5db5..f67e4094cfb 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -由於所有的實例都可以繼承 `prototype` 上的屬性,所以可以把 `prototype` 看作是創建對象的 "配方"。 請注意:`duck` 和 `canary` 的 `prototype` 屬於 `Bird` 的構造函數,即 Bird 的原型 `Bird.prototype`。 JavaScript 中幾乎所有的對象都有一個 `prototype` 屬性,這個屬性是屬於它所在的構造函數。 +由於所有的實例都可以繼承 `prototype` 上的屬性,所以可以把 `prototype` 看作是創建對象的 "配方"。 請注意:`duck` 和 `canary` 的 `prototype` 屬於 `Bird` 的構造函數,即 Bird 的原型 `Bird.prototype`。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index b3a70649b04..19cb7661889 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -按下面的原型信息創建一個名爲 `personSchema` 的 schema: +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` 採用 Mongoose 基礎 schema 類型。 你如果還想添加更多的鍵,就請使用 required 或 unique 等簡單的驗證器(validators),並設置默認值。 查看我們的 Mongoose 文章。 -請從 `personSchema` 創建一個名爲 `Person` 的 model。 +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 939a2663648..c8d1b59db20 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 `rem` 單位代表 `root em`,與 `html` 元素的字體大小有關。 -創建一個 `.small-text` 選擇器,並將 `font-size` 設置爲 `0.85rem`,計算結果大致爲 `13.6px`(記得你之前將 `html` 設置爲具有 `16px` 的 `font-size`)。 +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index b05de87bd86..dde27d99902 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ dashedName: escape-sequences-in-strings 使用转义字符把下面三行文本赋值给一个变量 `myStr`。 -
FirstLine
    \SecondLine
ThirdLine
+
+FirstLine
+    \SecondLine
+ThirdLine
+
你需要使用转义字符正确地插入特殊字符。 你也需要确保间距与上面文本一致,并且单词或转义字符之间没有空格。 diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index 4289d4fcaf6..2182441f079 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -60,43 +60,43 @@ assert(!/if/g.test(code)); assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` 应该是字符串 `Marley` +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` 应该是字符串 `The Answer` +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` 应该是字符串 `There is no #1` +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)`应该为 `Missed me by this much!`。 +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` 应该是字符串 `Ate Nine` +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` 应该为 `""` (empty string)。 +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` 应该为 `""` (empty string)。 +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index 60f7d5280bc..cb07ead8f80 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index a7a8dfea36a..e1ebbc94ddd 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -由于所有的实例都可以继承 `prototype` 上的属性,所以可以把 `prototype` 看作是创建对象的 "配方"。 请注意:`duck` 和 `canary` 的 `prototype` 属于 `Bird` 的构造函数,即 Bird 的原型 `Bird.prototype`。 JavaScript 中几乎所有的对象都有一个 `prototype` 属性,这个属性是属于它所在的构造函数。 +由于所有的实例都可以继承 `prototype` 上的属性,所以可以把 `prototype` 看作是创建对象的 "配方"。 请注意:`duck` 和 `canary` 的 `prototype` 属于 `Bird` 的构造函数,即 Bird 的原型 `Bird.prototype`。 # --instructions-- diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index f0406d58827..0026d42dfbf 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -按下面的原型信息创建一个名为 `personSchema` 的 schema: +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` 采用 Mongoose 基础 schema 类型。 你如果还想添加更多的键,就请使用 required 或 unique 等简单的验证器(validators),并设置默认值。 查看我们的 Mongoose 文章。 -请从 `personSchema` 创建一个名为 `Person` 的 model。 +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 126581cf570..744dcff1c02 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 `rem` 单位代表 `root em`,与 `html` 元素的字体大小有关。 -创建一个 `.small-text` 选择器,并将 `font-size` 设置为 `0.85rem`,计算结果大致为 `13.6px`(记得你之前将 `html` 设置为具有 `16px` 的 `font-size`)。 +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index ed94139c431..6867a40df5c 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ Las comillas no son los únicos caracteres que pueden ser escapados d Assign the following three lines of text into the single variable `myStr` using escape sequences. -
FirstLine
    \SecondLine
ThirdLine
+
+FirstLine
+    \SecondLine
+ThirdLine
+
You will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words. diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index af1290a3358..9b2dd3fd338 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -60,43 +60,43 @@ Debes tener al menos cuatro sentencias `break` assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` debe ser la cadena `Marley` +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` debe ser la cadena `The Answer` +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` debe ser la cadena `There is no #1` +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)` debe ser la cadena `Missed me by this much!` +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` debe ser la cadena `Ate Nine` +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` debe ser `""` (cadena vacía) +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` debe ser `""` (cadena vacía) +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index a0067745e2f..1bad6f93020 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index ce61d480118..261bcfddeac 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -Dado que todas las instancias tienen automáticamente las propiedades en el `prototype`, piensa en `prototype` como una "receta" para crear objetos. Ten en cuenta que el `prototype` de `duck` y `canary` es parte del constructor `Bird` como `Bird.prototype`. Casi todos los objetos en JavaScript tienen una propiedad `prototype` que es parte de la función constructora que lo creó. +Dado que todas las instancias tienen automáticamente las propiedades en el `prototype`, piensa en `prototype` como una "receta" para crear objetos. Ten en cuenta que el `prototype` de `duck` y `canary` es parte del constructor `Bird` como `Bird.prototype`. # --instructions-- diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index bac6fe18834..838dca0b36b 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -Crea un esquema de persona llamado `personSchema` con este prototipo: +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` Usa los tipos básicos de esquemas de Mongoose. Si quieres también puedes añadir más campos, utilizar validadores sencillos como required o unique, y establecer valores por defecto. Mira nuestro artículo sobre Mongoose . -Ahora, crea un modelo llamado `Person` del `personSchema`. +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 99ecae80fe9..fdbfd91d3e0 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 La unidad `rem` significa `root em`, y es relativa al tamaño de fuente del elemento `html`. -Cree un selector `.small-text` y establezca el `font-size` en `0.85rem`, que se calcularía en aproximadamente `13.6px` (recuerde que configuró su `html` para que tenga un `font-size` de `16px`). +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index fa0c6ecd7b8..a5460c798c8 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ Anführungszeichen sind nicht die einzigen Zeichen, die innerhalb eines Strings Assign the following three lines of text into the single variable `myStr` using escape sequences. -
FirstLine
    \SecondLine
ThirdLine
+
+FirstLine
+    \SecondLine
+ThirdLine
+
You will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words. diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index ec8f663898b..7b54ccf7200 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -60,43 +60,43 @@ Du solltest mindestens vier `break`-Anweisungen verwenden assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` sollte den String `Marley` ausgeben +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` sollte den String `The Answer` ausgeben +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` sollte den String `There is no #1` ausgeben +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)` sollte den String `Missed me by this much!` ausgeben +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` sollte den String `Ate Nine` ausgeben +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` sollte `""` (leerer String) ausgeben +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` sollte `""` (leerer String) ausgeben +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index a7e70ebd017..b7f7d5aaa22 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index 49b9be69172..7aeb1760796 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -Da alle Instanzen automatisch die Eigenschaften des Prototypen(`prototype`) besitzen, kannst du dir einen Prototypen(`prototype`) wie ein "Rezept" für die Erstellung von Objekten vorstellen. Beachte, dass der `prototype` für `duck` und `canary` Teil des Konstruktors von `Bird` als `Bird.prototype` ist. Fast jedes Objekt in JavaScript hat eine Eigenschaft `prototype`, die Teil der Konstruktorfunktion ist, die es erstellt hat. +Da alle Instanzen automatisch die Eigenschaften des Prototypen(`prototype`) besitzen, kannst du dir einen Prototypen(`prototype`) wie ein "Rezept" für die Erstellung von Objekten vorstellen. Beachte, dass der `prototype` für `duck` und `canary` Teil des Konstruktors von `Bird` als `Bird.prototype` ist. # --instructions-- diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/german/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index 88cc3d71011..8bd8b3a9cbf 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -Create a person schema called `personSchema` having this prototype: +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` Use the Mongoose basic schema types. If you want you can also add more fields, use simple validators like required or unique, and set default values. See our Mongoose article. -Now, create a model called `Person` from the `personSchema`. +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-286-scoring-probabilities.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-286-scoring-probabilities.md index 26e3e198604..fb6d0c340cc 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-286-scoring-probabilities.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-286-scoring-probabilities.md @@ -1,6 +1,6 @@ --- id: 5900f48a1000cf542c50ff9d -title: 'Problem 286: Scoring probabilities' +title: 'Problem 286: Trefferwahrscheinlichkeiten' challengeType: 1 forumTopicId: 301937 dashedName: problem-286-scoring-probabilities @@ -8,15 +8,15 @@ dashedName: problem-286-scoring-probabilities # --description-- -Barbara is a mathematician and a basketball player. She has found that the probability of scoring a point when shooting from a distance $x$ is exactly ($1 - \frac{x}{q}$), where $q$ is a real constant greater than 50. +Barbara ist Mathematikerin und Basketballspielerin. Sie hat herausgefunden, dass die Wahrscheinlichkeit, beim Schießen aus einer Entfernung $x$ einen Punkt zu erzielen, genau ($1 - \frac{x}{q}$) beträgt, wobei $q$ eine reelle Konstante größer als 50 ist. -During each practice run, she takes shots from distances $x = 1, x = 2, \ldots, x = 50$ and, according to her records, she has precisely a 2 % chance to score a total of exactly 20 points. +Bei jedem Übungslauf schießt sie aus den Entfernungen $x = 1, x = 2, \ldots, x = 50$ und hat nach ihren Aufzeichnungen eine Chance von genau 2 %, insgesamt genau 20 Punkte zu erzielen. -Find $q$ and give your answer rounded to 10 decimal places. +Finde $q$ und gib deine Antwort auf 10 Dezimalstellen gerundet an. # --hints-- -`scoringProbabilities()` should return `52.6494571953`. +`scoringProbabilities()` sollte `52.6494571953` zurückgeben. ```js assert.strictEqual(scoringProbabilities(), 52.6494571953); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-287-quadtree-encoding-a-simple-compression-algorithm.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-287-quadtree-encoding-a-simple-compression-algorithm.md index 707a6fa97e7..3dd2314f87b 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-287-quadtree-encoding-a-simple-compression-algorithm.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-287-quadtree-encoding-a-simple-compression-algorithm.md @@ -1,6 +1,6 @@ --- id: 5900f48b1000cf542c50ff9e -title: 'Problem 287: Quadtree encoding (a simple compression algorithm)' +title: 'Problem 287: Quadtree-Kodierung (ein einfacher Kompressionsalgorithmus)' challengeType: 1 forumTopicId: 301938 dashedName: problem-287-quadtree-encoding-a-simple-compression-algorithm @@ -8,32 +8,32 @@ dashedName: problem-287-quadtree-encoding-a-simple-compression-algorithm # --description-- -The quadtree encoding allows us to describe a $2^N×2^N$ black and white image as a sequence of bits (0 and 1). Those sequences are to be read from left to right like this: +Die Quadtree-Kodierung ermöglicht es uns, ein $2^N×2^N$-Schwarzweißbild als eine Folge von Bits (0 und 1) zu beschreiben. Diese Sequenzen sind von links nach rechts wie folgt zu lesen: -- the first bit deals with the complete $2^N×2^N$ region; -- "0" denotes a split: - - the current $2^n×2^n$ region is divided into 4 sub-regions of dimension $2^{n - 1}×2^{n - 1}$, - - the next bits contains the description of the top left, top right, bottom left and bottom right sub-regions - in that order; -- "10" indicates that the current region contains only black pixels; -- "11" indicates that the current region contains only white pixels. +- der erste Teil betrifft die gesamte Region $2^N×2^N$; +- "0" bedeutet eine Aufteilung: + - die aktuelle Region $2^n×2^n$ wird in 4 Unterregionen der Dimension $2^{n - 1}×2^{n - 1}$ unterteilt, + - die nächsten Bits enthalten die Beschreibung der Unterregionen oben links, oben rechts, unten links und unten rechts - in dieser Reihenfolge; +- "10" gibt an, dass die aktuelle Region nur schwarze Pixel enthält; +- "11" gibt an, dass die aktuelle Region nur weiße Pixel enthält. -Consider the following 4×4 image (colored marks denote places where a split can occur): +Betrachte das folgende 4×4-Bild (farbige Markierungen kennzeichnen die Stellen, an denen eine Teilung auftreten kann): -4x4 image with colored marks denoting place where split can occur +4x4-Bild mit farbigen Markierungen, die die Stellen kennzeichnen, an denen eine Teilung auftreten kann -This image can be described by several sequences, for example : "001010101001011111011010101010", of length 30, or "0100101111101110", of length 16, which is the minimal sequence for this image. +Dieses Bild kann durch mehrere Folgen beschrieben werden, zum Beispiel: "001010101001011111011010101010", der Länge 30, oder "0100101111101110", der Länge 16, welches die minimale Folge für dieses Bild ist. -For a positive integer $N$, define $D_N$ as the $2^N×2^N$ image with the following coloring scheme: +Für einen positven Integer $N$ definiere $D_N$ als das $2^N×2^N$-Bild mit dem folgenden Färbungsschema: -- the pixel with coordinates $x = 0$, $y = 0$ corresponds to the bottom left pixel, -- if ${(x - 2^{N - 1})}^2 + {(y - 2^{N - 1})}^2 ≤ 2^{2N - 2}$ then the pixel is black, -- otherwise the pixel is white. +- pixel mit den Koordinaten $x = 0$, $y = 0$ entspricht dem unteren linken Pixel, +- wenn ${(x - 2^{N - 1})}^2 + {(y - 2^{N - 1})}^2 ≤ 2^{2N - 2}$, dann ist das Pixel schwarz, +- andernfalls ist das Pixel weiß. -What is the length of the minimal sequence describing $D_{24}$? +Was ist die Länge der minimalen Sequentz, die $D_{24} $ beschreibt? # --hints-- -`quadtreeEncoding()` should return `313135496`. +`quadtreeEncoding()` sollte `313135496` zurückgeben. ```js assert.strictEqual(quadtreeEncoding(), 313135496); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.md index cd92a15cd8c..5b90badfffd 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.md @@ -1,6 +1,6 @@ --- id: 5900f48d1000cf542c50ff9f -title: 'Problem 288: An enormous factorial' +title: 'Problem 288: Ein riesiger Faktor' challengeType: 1 forumTopicId: 301939 dashedName: problem-288-an-enormous-factorial @@ -8,22 +8,22 @@ dashedName: problem-288-an-enormous-factorial # --description-- -For any prime $p$ the number $N(p,q)$ is defined by $N(p,q) = \sum_{n=0}^q T_n \times p^n$ with $T_n$ generated by the following random number generator: +Für jede Primzahl $p$ ist die Zahl $N(p,q)$ definiert durch $N(p,q) = \sum_{n=0}^q T_n \times p^n$, wobei $T_n$ durch den folgenden Zufallszahlengenerator erzeugt wird: $$\begin{align} & S_0 = 290797 \\\\ & S_{n + 1} = {S_n}^2\bmod 50\\,515\\,093 \\\\ & T_n = S_n\bmod p \end{align}$$ -Let $Nfac(p,q)$ be the factorial of $N(p,q)$. +Lasse $Nfac(p,q)$ die Fakultät von $N(p,q)$ sein. -Let $NF(p,q)$ be the number of factors $p$ in $Nfac(p,q)$. +Lasse $NF(p,q)$ die Anzahl der Faktoren $p$ in $Nfac(p,q)$ sein. -You are given that $NF(3,10000) \bmod 3^{20} = 624\\,955\\,285$. +Es ist gegeben, dass $NF(3,10000) \bmod 3^{20} = 624\\,955\\,285$. -Find $NF(61,{10}^7)\bmod {61}^{10}$. +Finde $NF(61,{10}^7)\bmod {61}^{10}$. # --hints-- -`enormousFactorial()` should return `605857431263982000`. +`enormousFactorial()` sollte `605857431263982000` zurückgeben. ```js assert.strictEqual(enormousFactorial(), 605857431263982000); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-289-eulerian-cycles.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-289-eulerian-cycles.md index e491cab3612..0fcd1985b94 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-289-eulerian-cycles.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-289-eulerian-cycles.md @@ -1,6 +1,6 @@ --- id: 5900f48d1000cf542c50ffa0 -title: 'Problem 289: Eulerian Cycles' +title: 'Problem 289: Eulersche Zyklen' challengeType: 1 forumTopicId: 301940 dashedName: problem-289-eulerian-cycles @@ -8,23 +8,23 @@ dashedName: problem-289-eulerian-cycles # --description-- -Let $C(x,y)$ be a circle passing through the points ($x$, $y$), ($x$, $y + 1$), ($x + 1$, $y$) and ($x + 1$, $y + 1$). +Lasse $C(x,y)$ einen Kreis sein, der durch die Punkte ($x$, $y$), ($x$, $y + 1$), ($x + 1$, $y$) und ($x + 1$, $y + 1$) geht. -For positive integers $m$ and $n$, let $E(m,n)$ be a configuration which consists of the $m·n$ circles: { $C(x,y)$: $0 ≤ x < m$, $0 ≤ y < n$, $x$ and $y$ are integers } +Für positive ganze Zahlen $m$ und $n$ sei $E(m,n)$ eine Konfiguration, die aus den $m·n$ Kreisen besteht: { $C(x,y)$: $0 ≤ x < m$, $0 ≤ y < n$, $x$ und $y$ sind ganze Zahlen } -An Eulerian cycle on $E(m,n)$ is a closed path that passes through each arc exactly once. Many such paths are possible on $E(m,n)$, but we are only interested in those which are not self-crossing: A non-crossing path just touches itself at lattice points, but it never crosses itself. +Ein Eulerscher Zyklus auf $E(m,n)$ ist ein geschlossener Pfad, der jeden Bogen genau einmal durchläuft. Auf $E(m,n)$ sind viele solcher Pfade möglich, aber wir interessieren uns nur für solche, die sich nicht selbst kreuzen: Ein nicht sich selbst kreuzender Pfad berührt sich nur an Gitterpunkten, aber er kreuzt sich nie. -The image below shows $E(3,3)$ and an example of an Eulerian non-crossing path. +Die folgende Abbildung zeigt $E(3,3)$ und ein Beispiel für einen Eulerschen nicht kreuzenden Pfad. -Eulerian cycle E(3, 3) and Eulerian non-crossing path +Eulerscher Zyklus E(3, 3) und Eulersche sich nicht kreuzende Pfade -Let $L(m,n)$ be the number of Eulerian non-crossing paths on $E(m,n)$. For example, $L(1,2) = 2$, $L(2,2) = 37$ and $L(3,3) = 104290$. +Lasse $L(m,n)$ die Anzahl der Eulerschen sich nicht kreuzenden Pfade auf $E(m,n)$ sein. Zum Beispiel ist $L(1,2) = 2$, $L(2,2) = 37$ und $L(3,3) = 104290$. -Find $L(6,10)\bmod {10}^{10}$. +Finde $L(6,10)\bmod {10}^{10}$. # --hints-- -`eulerianCycles()` should return `6567944538`. +`eulerianCycles()` sollte `6567944538` zurückgeben. ```js assert.strictEqual(eulerianCycles(), 6567944538); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-290-digital-signature.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-290-digital-signature.md index a6b3636eefd..6f88e773586 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-290-digital-signature.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-290-digital-signature.md @@ -1,6 +1,6 @@ --- id: 5900f48f1000cf542c50ffa1 -title: 'Problem 290: Digital Signature' +title: 'Problem 290: Digitale Signatur' challengeType: 1 forumTopicId: 301942 dashedName: problem-290-digital-signature @@ -8,11 +8,11 @@ dashedName: problem-290-digital-signature # --description-- -How many integers $0 ≤ n < {10}^{18}$ have the property that the sum of the digits of $n$ equals the sum of digits of $137n$? +Wie viele ganze Zahlen $0 ≤ n < {10}^{18}$ haben die Eigenschaft, dass die Summe der Ziffern von $n$ gleich der Summe der Ziffern von $137n$ ist? # --hints-- -`digitalSignature()` should return `20444710234716470`. +`digitalSignature()` sollte `20444710234716470` zurückgeben. ```js assert.strictEqual(digitalSignature(), 20444710234716470); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-291-panaitopol-primes.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-291-panaitopol-primes.md index bb33727271a..5f4206674b0 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-291-panaitopol-primes.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-291-panaitopol-primes.md @@ -1,6 +1,6 @@ --- id: 5900f48f1000cf542c50ffa2 -title: 'Problem 291: Panaitopol Primes' +title: 'Problem 291: Panaitopol-Primzahlen' challengeType: 1 forumTopicId: 301943 dashedName: problem-291-panaitopol-primes @@ -8,13 +8,13 @@ dashedName: problem-291-panaitopol-primes # --description-- -A prime number $p$ is called a Panaitopol prime if $p = \frac{x^4 - y^4}{x^3 + y^3}$ for some positive integers $x$ and $y$. +Eine Primzahl $p$ heißt eine Panaitopol-Primzahl, wenn $p = \frac{x^4 - y^4}{x^3 + y^3}$ für einige positive Integer $x$ und $y$ ist. -Find how many Panaitopol primes are less than $5 × {10}^{15}$. +Finde heraus, wie viele Panaitopol-Primzahlen kleiner als $5 × {10}^{15}$ sind. # --hints-- -`panaitopolPrimes()` should return `4037526`. +`panaitopolPrimes()` sollte `4037526` zurückgeben. ```js assert.strictEqual(panaitopolPrimes(), 4037526); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-292-pythagorean-polygons.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-292-pythagorean-polygons.md index 8e0dd899454..e79fe72c3f6 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-292-pythagorean-polygons.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-292-pythagorean-polygons.md @@ -1,6 +1,6 @@ --- id: 5900f4911000cf542c50ffa3 -title: 'Problem 292: Pythagorean Polygons' +title: 'Problem 292: Pythagoras Vielecke' challengeType: 1 forumTopicId: 301944 dashedName: problem-292-pythagorean-polygons @@ -8,24 +8,24 @@ dashedName: problem-292-pythagorean-polygons # --description-- -We shall define a pythagorean polygon to be a convex polygon with the following properties: +Wir definieren ein pythagoreisches Vieleck als ein konvexes Vieleck mit den folgenden Eigenschaften: -- there are at least three vertices, -- no three vertices are aligned, -- each vertex has integer coordinates, -- each edge has integer length. +- es gibt mindestens drei Scheitelpunkte, +- es sind keine drei Scheitelpunkte aufeinander ausgerichtet, +- jeder Scheitelpunkt hat ganzzahlige Koordinaten, +- jede Kante hat eine ganzzahlige Länge. -For a given integer $n$, define $P(n)$ as the number of distinct pythagorean polygons for which the perimeter is $≤ n$. +Definiere für eine gegebene ganze Zahl $n$ $P(n)$ als die Anzahl der verschiedenen pythagoreische Vielecke, deren Umfang $≤ n$ ist. -Pythagorean polygons should be considered distinct as long as none is a translation of another. +Pythagoreische Vielecke sollten als verschieden betrachtet werden, solange keines eine Übersetzung eines anderen ist. -You are given that $P(4) = 1$, $P(30) = 3655$ and $P(60) = 891045$. +Es ist gegeben, dass $P(4) = 1$, $P(30) = 3655$ und $P(60) = 891045$. -Find $P(120)$. +Finde $P(120)$. # --hints-- -`pythagoreanPolygons()` should return `3600060866`. +`pythagoreanPolygons()` sollte `3600060866` zurückgeben. ```js assert.strictEqual(pythagoreanPolygons(), 3600060866); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.md index 0c8076828de..d124a7a9580 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.md @@ -1,6 +1,6 @@ --- id: 5900f4931000cf542c50ffa4 -title: 'Problem 293: Pseudo-Fortunate Numbers' +title: 'Problem 293: Pseudo-Glückszahlen' challengeType: 1 forumTopicId: 301945 dashedName: problem-293-pseudo-fortunate-numbers @@ -8,19 +8,19 @@ dashedName: problem-293-pseudo-fortunate-numbers # --description-- -An even positive integer $N$ will be called admissible, if it is a power of 2 or its distinct prime factors are consecutive primes. +Ein gerader positiver Integer $N$ wird zulässig genannt, wenn sie eine Potenz von 2 ist oder ihre verschiedenen Primfaktoren aufeinanderfolgende Primzahlen sind. -The first twelve admissible numbers are 2, 4, 6, 8, 12, 16, 18, 24, 30, 32, 36, 48. +Die ersten zwölf zulässigen Zahlen sind 2, 4, 6, 8, 12, 16, 18, 24, 30, 32, 36, 48. -If $N$ is admissible, the smallest integer $M > 1$ such that $N + M$ is prime, will be called the pseudo-Fortunate number for $N$. +Wenn $N$ zulässig ist, wird der kleinste Integer $M > 1$, so dass $N + M$ eine Primzahl ist, die Pseudo-Glückszahl für $N$ genannt. -For example, $N = 630$ is admissible since it is even and its distinct prime factors are the consecutive primes 2, 3, 5 and 7. The next prime number after 631 is 641; hence, the pseudo-Fortunate number for 630 is $M = 11$. It can also be seen that the pseudo-Fortunate number for 16 is 3. +Zum Beispiel ist $N = 630$ zulässig, da es gerade ist und seine verschiedenen Primfaktoren die aufeinanderfolgenden Primzahlen 2, 3, 5 und 7 sind. Die nächste Primzahl nach 631 ist 641; die Pseudo-Glückszahl für 630 ist also $M = 11$. Es ist auch ersichtlich, dass die Pseudo-Glückszahl für 16 gleich 3 ist. -Find the sum of all distinct pseudo-Fortunate numbers for admissible numbers $N$ less than ${10}^9$. +Finde die Summe aller unterschiedlichen Pseudo-Glückszahlen für zulässige Zahlen $N$ kleiner als ${10}^9$. # --hints-- -`pseudoFortunateNumbers()` should return `2209`. +`pseudoFortunateNumbers()` sollte `2209` zurückgeben. ```js assert.strictEqual(pseudoFortunateNumbers(), 2209); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-294-sum-of-digits---experience-23.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-294-sum-of-digits---experience-23.md index b32ebc882de..57f9ad9924a 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-294-sum-of-digits---experience-23.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-294-sum-of-digits---experience-23.md @@ -1,6 +1,6 @@ --- id: 5900f4931000cf542c50ffa5 -title: 'Problem 294: Sum of digits - experience #23' +title: 'Problem 294: Summe der Ziffern - Erfahrung #23' challengeType: 1 forumTopicId: 301946 dashedName: problem-294-sum-of-digits---experience-23 @@ -8,20 +8,20 @@ dashedName: problem-294-sum-of-digits---experience-23 # --description-- -For a positive integer $k$, define $d(k)$ as the sum of the digits of $k$ in its usual decimal representation. Thus $d(42) = 4 + 2 = 6$. +Definiere für einen positiven Integer $k$ $d(k)$ als die Summe der Ziffern von $k$ in seiner üblichen Dezimaldarstellung. Somit ist $d(42) = 4 + 2 = 6$. -For a positive integer $n$, define $S(n)$ as the number of positive integers $k < {10}^n$ with the following properties: +Für einen positiven Integer $n$ definiere $S(n)$ als die Anzahl der positiven Integer $k < {10}^n$ mit den folgenden Eigenschaften: -- $k$ is divisible by 23 and, +- $k$ ist durch 23 teilbar und, - $d(k) = 23$. -You are given that $S(9) = 263\\,626$ and $S(42) = 6\\,377\\,168\\,878\\,570\\,056$. +Es ist gegeben, dass $S(9) = 263\\,626$ und $S(42) = 6\\,377\\,168\,878\\,570\\,056$. -Find $S({11}^{12})$ and give your answer $\bmod {10}^9$. +Finde $S({11}^{12})$ und gib deine Antwort $\bmod {10}^9$. # --hints-- -`experience23()` should return `789184709`. +`experience23()` sollte `789184709` zurückgeben. ```js assert.strictEqual(experience23(), 789184709); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-295-lenticular-holes.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-295-lenticular-holes.md index 9354ea7c840..96120db5bd5 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-295-lenticular-holes.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-295-lenticular-holes.md @@ -1,6 +1,6 @@ --- id: 5900f4931000cf542c50ffa6 -title: 'Problem 295: Lenticular holes' +title: 'Problem 295: Lentikularförmige Löcher' challengeType: 1 forumTopicId: 301947 dashedName: problem-295-lenticular-holes @@ -8,32 +8,32 @@ dashedName: problem-295-lenticular-holes # --description-- -We call the convex area enclosed by two circles a lenticular hole if: +Wir nennen die konvexe Fläche, die von zwei Kreisen umschlossen ist, ein lentikularförmiges Loch, wenn: -- The centres of both circles are on lattice points. -- The two circles intersect at two distinct lattice points. -- The interior of the convex area enclosed by both circles does not contain any lattice points. +- Die Zentren beider Kreise befinden sich auf Gitterpunkten. +- Die beiden Kreise überschneiden sich an zwei unterschiedlichen Gitterpunkten. +- Das von beiden Kreisen eingeschlossene Innere des konvexen Bereichs enthält keine Gitterpunkte. -Consider the circles: +Betrachte die Kreise: -$$\begin{align} & C_0: x^2 + y^2 = 25 \\\\ +$$\start{align} & C_0: x^2 + y^2 = 25 \\\\ & C_1: {(x + 4)}^2 + {(y - 4)}^2 = 1 \\\\ & C_2: {(x - 12)}^2 + {(y - 4)}^2 = 65 \end{align}$$ -The circles $C_0$, $C_1$ and $C_2$ are drawn in the picture below. +Die Kreise $C_0$, $C_1$ und $C_2$ werden im Bild unten gezeichnet. -C_0, C_1 and C_2 circles +C_0, C_1 und C_2 Kreise -$C_0$ and $C_1$ form a lenticular hole, as well as $C_0$ and $C_2$. +$C_0$ und $C_1$ bilden ein lentikularförmiges Loch, sowie $C_0$ und $C_2$. -We call an ordered pair of positive real numbers ($r_1$, $r_2$) a lenticular pair if there exist two circles with radii $r_1$ and $r_2$ that form a lenticular hole. We can verify that ($1$, $5$) and ($5$, $\sqrt{65}$) are the lenticular pairs of the example above. +Wir nennen ein geordnetes Paar positiver reeller Zahlen ($r_1$, $r_2$) ein lentikulares Paar, wenn es zwei Kreise mit Radii $r_1$ und $r_2$ gibt, die ein lentikularförmiges Loch bilden. Wir können bestätigen, dass ($1$, $5$) und ($5$, $\sqrt{65}$) die lentikularen Paare des obigen Beispiels sind. -Let $L(N)$ be the number of distinct lenticular pairs ($r_1$, $r_2$) for which $0 < r_1 ≤ r_2 ≤ N$. We can verify that $L(10) = 30$ and $L(100) = 3442$. +Lasse $L(N)$ die Anzahl der verschiedenen lentikularen Paare ($r_1$, $r_2$) sein, für die $0 < r_1 ≤ r_2 ≤ N$ gilt. Wir können überprüfen, dass $L(10) = 30$ und $L(100) = 3442$. -Find $L(100\\,000)$. +Finde $L(100\\,000)$. # --hints-- -`lenticularHoles()` should return `4884650818`. +`lenticularHoles()()` sollte `4884650818` zurückgeben. ```js assert.strictEqual(lenticularHoles(), 4884650818); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.md index 8f168658b0b..dc53bd72470 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.md @@ -1,6 +1,6 @@ --- id: 5900f4951000cf542c50ffa8 -title: 'Problem 297: Zeckendorf Representation' +title: 'Problem 297: Satz von Zeckendorf' challengeType: 1 forumTopicId: 301949 dashedName: problem-297-zeckendorf-representation @@ -12,13 +12,13 @@ Jedes neue Element in der Fibonacci-Folge wird durch Zusatz der beiden vorherige Beginnend mit 1 und 2 werden die ersten 10 Elemente lauten: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89. -Jeder positive Integer kann einzigartig als Summe aufeinanderfolgender Elemente der Fibonacci Folge geschrieben werden. For example, 100 = 3 + 8 + 89. +Jeder positive Integer kann einzigartig als Summe aufeinanderfolgender Elemente der Fibonacci Folge geschrieben werden. Zum Beispiel, 100 = 3 + 8 + 89. Eine solche Summe nennt man Zeckendorf Repräsentation der Zahl. Für jede Ganzzahl $n>0$, lass $z(n)$ die Anzahl der Begriffe in der Zeckendorf-Darstellung von $n$ sein. -Thus, $z(5) = 1$, $z(14) = 2$, $z(100) = 3$ etc. +Demzufolge, $z(5) = 1$, $z(14) = 2$, $z(100) = 3$ etc. Auch für $0 < n < {10}^6$, $\sum z(n) = 7\\,894\\,453$. diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-298-selective-amnesia.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-298-selective-amnesia.md index da401b24b95..9c472982fe9 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-298-selective-amnesia.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-298-selective-amnesia.md @@ -1,6 +1,6 @@ --- id: 5900f4971000cf542c50ffa9 -title: 'Problem 298: Selective Amnesia' +title: 'Problem 298: Selektive Amnesie' challengeType: 1 forumTopicId: 301950 dashedName: problem-298-selective-amnesia @@ -8,30 +8,30 @@ dashedName: problem-298-selective-amnesia # --description-- -Larry and Robin play a memory game involving of a sequence of random numbers between 1 and 10, inclusive, that are called out one at a time. Each player can remember up to 5 previous numbers. When the called number is in a player's memory, that player is awarded a point. If it's not, the player adds the called number to his memory, removing another number if his memory is full. +Larry und Robin spielen ein Gedächtnisspiel mit einer Sequenz von zufälligen Zahlen zwischen 1 und 10, welche nacheinander aufgerufen werden. Jeder Spieler kann sich bis zu 5 vorherige Zahlen merken. Wenn sich die aufgerufene Nummer im Gedächtnis eines Spielers befindet, erhält dieser Spieler einen Punkt. Wenn das nicht der Fall ist, fügt der Spieler die aufgerufene Nummer seinem Gedächtnis hinzu, indem er eine weitere Zahl löscht, wenn er sich nichts mehr merken kann. -Both players start with empty memories. Both players always add new missed numbers to their memory but use a different strategy in deciding which number to remove: Larry's strategy is to remove the number that hasn't been called in the longest time. Robin's strategy is to remove the number that's been in the memory the longest time. +Beide Spieler beginnen ohne eine Zahl im Gedächtnis. Beide Spieler fügen immer neue noch nicht gannnete Zahlen in ihren Speicher ein, verwenden aber eine andere Strategie, um zu entscheiden, welche Nummer entfernt werden soll: Larrys Strategie besteht darin, die Nummer zu entfernen, die am längsten nicht mehr genannt wurde. Robins Strategie ist es, die Nummer zu entfernen, die er sich am längsten gemerkt hat. -Example game: +Beispielspiel: -| Turn | Called number | Larry's memory | Larry's score | Robin's memory | Robin's score | -| ---- | ------------- | --------------:| ------------- | -------------- | ------------- | -| 1 | 1 | 1 | 0 | 1 | 0 | -| 2 | 2 | 1,2 | 0 | 1,2 | 0 | -| 3 | 4 | 1,2,4 | 0 | 1,2,4 | 0 | -| 4 | 6 | 1,2,4,6 | 0 | 1,2,4,6 | 0 | -| 5 | 1 | 1,2,4,6 | 1 | 1,2,4,6 | 1 | -| 6 | 8 | 1,2,4,6,8 | 1 | 1,2,4,6,8 | 1 | -| 7 | 10 | 1,4,6,8,10 | 1 | 2,4,6,8,10 | 1 | -| 8 | 2 | 1,2,6,8,10 | 1 | 2,4,6,8,10 | 2 | -| 9 | 4 | 1,2,4,8,10 | 1 | 2,4,6,8,10 | 3 | -| 10 | 1 | 1,2,4,8,10 | 2 | 1,4,6,8,10 | 3 | +| Zug | Aufgerufene Nummer | Larry's Gedächtnis | Larry's Punktzahl | Robin's Gedächtnis | Robin's Punktzahl | +| --- | ------------------ | ------------------:| ----------------- | ------------------ | ----------------- | +| 1 | 1 | 1 | 0 | 1 | 0 | +| 2 | 2 | 1,2 | 0 | 1,2 | 0 | +| 3 | 4 | 1,2,4 | 0 | 1,2,4 | 0 | +| 4 | 6 | 1,2,4,6 | 0 | 1,2,4,6 | 0 | +| 5 | 1 | 1,2,4,6 | 1 | 1,2,4,6 | 1 | +| 6 | 8 | 1,2,4,6,8 | 1 | 1,2,4,6,8 | 1 | +| 7 | 10 | 1,4,6,8,10 | 1 | 2,4,6,8,10 | 1 | +| 8 | 2 | 1,2,6,8,10 | 1 | 2,4,6,8,10 | 2 | +| 9 | 4 | 1,2,4,8,10 | 1 | 2,4,6,8,10 | 3 | +| 10 | 1 | 1,2,4,8,10 | 2 | 1,4,6,8,10 | 3 | -Denoting Larry's score by $L$ and Robin's score by $R$, what is the expected value of $|L - R|$ after 50 turns? Give your answer rounded to eight decimal places using the format x.xxxxxxxx . +Berücksichtigt man Larry's Punktzahl bei $L$ und Robin's Punktzahl bei $R$, was ist der vorraussichtliche Wert von $|L - R|$ nach 50 Zügen? Gebe deine Antwort auf sechs Dezimalstellen gerundet in der Form x.xxxxxxxx an . # --hints-- -`selectiveAmnesia()` should return `1.76882294`. +`selectiveAmnesia()` sollte `1.76882294` zurückgeben. ```js assert.strictEqual(selectiveAmnesia(), 1.76882294); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-299-three-similar-triangles.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-299-three-similar-triangles.md index 5bd781949f5..1c1f8328023 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-299-three-similar-triangles.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-299-three-similar-triangles.md @@ -1,6 +1,6 @@ --- id: 5900f4971000cf542c50ffaa -title: 'Problem 299: Three similar triangles' +title: 'Problem 299: Drei ähnliche Dreiecke' challengeType: 1 forumTopicId: 301951 dashedName: problem-299-three-similar-triangles @@ -8,29 +8,29 @@ dashedName: problem-299-three-similar-triangles # --description-- -Four points with integer coordinates are selected: +Es werden vier Punkte mit ganzzahligen Koordinaten ausgewählt: -$A(a, 0)$, $B(b, 0)$, $C(0, c)$ and $D(0, d)$, with $0 < a < b$ and $0 < c < d$. +$A(a, 0)$, $B(b, 0)$, $C(0, c)$ und $D(0, d)$, mit $0 < a < b$ und $0 < c < d$. -Point $P$, also with integer coordinates, is chosen on the line $AC$ so that the three triangles $ABP$, $CDP$ and $BDP$ are all similar. +Der Punkt $P$, ebenfalls mit ganzzahligen Koordinaten, wird auf der Geraden $AC$ so gewählt, dass die drei Dreiecke $ABP$, $CDP$ und $BDP$ alle ähnlich sind. -points A, B, C, D and P creating three triangles: ABP, CDP, and BDP +die Punkte A, B, C, D und P bilden drei Dreiecke: ABP, CDP und BDP -It is easy to prove that the three triangles can be similar, only if $a = c$. +Es ist leicht zu beweisen, dass die drei Dreiecke nur ähnlich sein können, wenn $a = c$. -So, given that $a = c$, we are looking for triplets ($a$, $b$, $d$) such that at least one point $P$ (with integer coordinates) exists on $AC$, making the three triangles $ABP$, $CDP$ and $BDP$ all similar. +Gesetzt den Fall, dass $a = c$ ist, suchen wir also nach Tripletts ($a$, $b$, $d$), die so beschaffen sind, dass mindestens ein Punkt $P$ (mit ganzzahligen Koordinaten) auf $AC$ existiert, wodurch die drei Dreiecke $ABP$, $CDP$ und $BDP$ alle ähnlich sind. -For example, if $(a, b, d) = (2, 3, 4)$, it can be easily verified that point $P(1, 1)$ satisfies the above condition. Note that the triplets (2,3,4) and (2,4,3) are considered as distinct, although point $P(1, 1)$ is common for both. +Ist beispielsweise $(a, b, d) = (2, 3, 4)$, so lässt sich leicht überprüfen, ob der Punkt $P(1, 1)$ die obige Bedingung erfüllt. Man beachte, dass die Tripletts (2,3,4) und (2,4,3) als unterschiedlich betrachtet werden, obwohl $P(1, 1)$ ein gemeinsamer Punkt ist. -If $b + d < 100$, there are 92 distinct triplets ($a$, $b$, $d$) such that point $P$ exists. +Wenn $b + d < 100$, gibt es 92 verschiedene Tripel ($a$, $b$, $d$), sodass der Punkt $P$ existiert. -If $b + d < 100\\,000$, there are 320471 distinct triplets ($a$, $b$, $d$) such that point $P$ exists. +Wenn $b + d < 100\\,000$, gibt es 320471 verschiedene Tripel ($a$, $b$, $d$), sodass der Punkt $P$ existiert. -If $b + d < 100\\,000\\,000$, how many distinct triplets ($a$, $b$, $d$) are there such that point $P$ exists? +Wenn $b + d < 100\\,000\\,000$ ist, wie viele verschiedene Dreiergruppen ($a$, $b$, $d$) gibt es dann, sodass der Punkt $P$ existiert? # --hints-- -`threeSimilarTriangles()` should return `549936643`. +`threeSimilarTriangles()` sollte `549936643` zurückgeben. ```js assert.strictEqual(threeSimilarTriangles(), 549936643); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-300-protein-folding.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-300-protein-folding.md index d5f2020b784..dd726c1cfdc 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-300-protein-folding.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-300-protein-folding.md @@ -1,6 +1,6 @@ --- id: 5900f49a1000cf542c50ffac -title: 'Problem 300: Protein folding' +title: 'Problem 300: Proteinfaltung' challengeType: 1 forumTopicId: 301954 dashedName: problem-300-protein-folding @@ -8,29 +8,29 @@ dashedName: problem-300-protein-folding # --description-- -In a very simplified form, we can consider proteins as strings consisting of hydrophobic (H) and polar (P) elements, e.g. HHPPHHHPHHPH. +In einer sehr vereinfachten Form können wir Proteine als Strings betrachten, die aus hydrophoben (H) und polaren (P) Elementen bestehen, z. B. HHPPHHHPHHPH. -For this problem, the orientation of a protein is important; e.g. HPP is considered distinct from PPH. Thus, there are $2^n$ distinct proteins consisting of $n$ elements. +Für dieses Problem ist die Orientierung eines Proteins wichtig; z. B. wird HPP als etwas anderes als PPH betrachtet. Es gibt also $2^n$ verschiedene Proteine, die aus $n$ Elementen bestehen. -When one encounters these strings in nature, they are always folded in such a way that the number of H-H contact points is as large as possible, since this is energetically advantageous. +Wenn man diese Fäden in der Natur antrifft, sind sie immer so gefaltet, dass die Anzahl der H-H-Kontaktpunkte so groß wie möglich ist, da dies energetisch vorteilhaft ist. -As a result, the H-elements tend to accumulate in the inner part, with the P-elements on the outside. +Infolgedessen sammeln sich die H-Elemente eher im inneren Teil an, während die P-Elemente außen liegen. -Natural proteins are folded in three dimensions of course, but we will only consider protein folding in two dimensions. +Natürliche Proteine werden natürlich in drei Dimensionen gefaltet, aber wir werden die Proteinfaltung nur in zwei Dimensionen betrachten. -The figure below shows two possible ways that our example protein could be folded (H-H contact points are shown with red dots). +Die folgende Abbildung zeigt zwei mögliche Wege, auf denen unser Beispielprotein gefaltet werden könnte (H-H-Kontaktpunkte sind mit roten Punkten dargestellt). -two possible ways to fold example protein +zwei mögliche Arten der Faltung des Beispielproteins -The folding on the left has only six H-H contact points, thus it would never occur naturally. On the other hand, the folding on the right has nine H-H contact points, which is optimal for this string. +Die Faltung auf der linken Seite hat nur sechs H-H-Kontaktpunkte, sodass sie auf natürliche Weise niemals auftreten würde. Die Faltung auf der rechten Seite hat dagegen neun H-H-Kontaktpunkte, was für diese Zeichenkette optimal ist. -Assuming that H and P elements are equally likely to occur in any position along the string, the average number of H-H contact points in an optimal folding of a random protein string of length 8 turns out to be $\frac{850}{2^8} = 3.3203125$. +Unter der Annahme, dass H- und P-Elemente mit gleicher Wahrscheinlichkeit an jeder Position entlang der Kette auftreten, beträgt die durchschnittliche Anzahl der H-H-Kontaktpunkte bei einer optimalen Faltung einer zufälligen Proteinkette der Länge 8 $\frac{850}{2^8} = 3,3203125$. -What is the average number of H-H contact points in an optimal folding of a random protein string of length 15? Give your answer using as many decimal places as necessary for an exact result. +Wie hoch ist die durchschnittliche Anzahl der H-H-Kontaktpunkte bei einer optimalen Faltung einer zufälligen Proteinkette der Länge 15? Gib deine Antwort mit so vielen Dezimalstellen an, wie für ein genaues Ergebnis erforderlich sind. # --hints-- -`proteinFolding()` should return `8.0540771484375`. +`proteinFolding()` sollte `8.0540771484375` zurückgeben. ```js assert.strictEqual(proteinFolding(), 8.0540771484375); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-301-nim.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-301-nim.md index b66b1b9ae06..9c2b9aa36f9 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-301-nim.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-301-nim.md @@ -8,31 +8,31 @@ dashedName: problem-301-nim # --description-- -Nim is a game played with heaps of stones, where two players take it in turn to remove any number of stones from any heap until no stones remain. +Nim ist ein Spiel mit Steinhaufen, bei dem zwei Spieler abwechselnd eine beliebige Anzahl von Steinen von einem beliebigen Haufen entfernen, bis keine Steine mehr übrig sind. -We'll consider the three-heap normal-play version of Nim, which works as follows: +Wir betrachten die Normalspielversion von Nim mit drei Haufen, die wie folgt funktioniert: -- At the start of the game there are three heaps of stones. -- On his turn the player removes any positive number of stones from any single heap. -- The first player unable to move (because no stones remain) loses. +- Zu Beginn des Spiels gibt es drei Steinhaufen. +- In seinem Zug entfernt der Spieler eine beliebige positive Anzahl von Steinen von einem beliebigen Haufen. +- Der erste Spieler, der nicht mehr ziehen kann (weil er keine Steine mehr hat), hat verloren. -If ($n_1$, $n_2$, $n_3$) indicates a Nim position consisting of heaps of size $n_1$, $n_2$ and $n_3$ then there is a simple function $X(n_1,n_2,n_3)$ — that you may look up or attempt to deduce for yourself — that returns: +Wenn ($n_1$, $n_2$, $n_3$) eine Nim-Position angibt, die aus Haufen der Größe $n_1$, $n_2$ und $n_3$ besteht, dann gibt es eine einfache Funktion $X(n_1,n_2,n_3)$ - die man nachschlagen oder versuchen kann, selbst abzuleiten - die zurückgibt: -- zero if, with perfect strategy, the player about to move will eventually lose; or -- non-zero if, with perfect strategy, the player about to move will eventually win. +- Null, wenn der Spieler, der am Zug ist, bei perfekter Strategie letztendlich verlieren wird; oder +- ungleich Null, wenn der Spieler, der am Zug ist, bei perfekter Strategie schließlich gewinnt. -For example $X(1, 2, 3) = 0$ because, no matter what the current player does, his opponent can respond with a move that leaves two heaps of equal size, at which point every move by the current player can be mirrored by his opponent until no stones remain; so the current player loses. To illustrate: +Zum Beispiel $X(1, 2, 3) = 0$, denn egal, was der aktuelle Spieler tut, kann sein Gegner mit einem Zug antworten, der zwei gleich große Haufen übrig lässt, woraufhin jeder Zug des aktuellen Spielers von seinem Gegner gespiegelt werden kann, bis keine Steine mehr übrig sind; der aktuelle Spieler verliert also. Zur Veranschaulichung: -- current player moves to (1,2,1) -- opponent moves to (1,0,1) -- current player moves to (0,0,1) -- opponent moves to (0,0,0), and so wins. +- aktuelle Spieler bewegt sich auf (1,2,1) +- Gegner bewegt sich auf (1,0,1) +- aktuelle Spieler bewegt sich auf (0,0,1) +- Der Gegner bewegt sich auf (0,0,0), und gewinnt somit. -For how many positive integers $n ≤ 2^{30}$ does $X(n, 2n, 3n) = 0$? +Für wie viele positive Integer $n ≤ 2^{30}$ gilt $X(n, 2n, 3n) = 0$? # --hints-- -`nim()` should return `2178309`. +`nim()` sollte `2178309` zurückgeben. ```js assert.strictEqual(nim(), 2178309); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-302-strong-achilles-numbers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-302-strong-achilles-numbers.md index 4c5301c49bf..b573d1e8a78 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-302-strong-achilles-numbers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-302-strong-achilles-numbers.md @@ -1,6 +1,6 @@ --- id: 5900f49b1000cf542c50ffad -title: 'Problem 302: Strong Achilles Numbers' +title: 'Problem 302: Starke Achilles-Zahlen' challengeType: 1 forumTopicId: 301956 dashedName: problem-302-strong-achilles-numbers @@ -8,23 +8,23 @@ dashedName: problem-302-strong-achilles-numbers # --description-- -A positive integer $n$ is powerful if $p^2$ is a divisor of $n$ for every prime factor $p$ in $n$. +Eine positiver Integer $n$ ist mächtig, wenn $p^2$ ein Teiler von $n$ für jeden Primfaktor $p$ in $n$ ist. -A positive integer $n$ is a perfect power if $n$ can be expressed as a power of another positive integer. +Ein positiver Integer $n$ ist eine vollkommene Potenz, wenn $n$ als Potenz eines anderen positiven Integers ausgedrückt werden kann. -A positive integer $n$ is an Achilles number if $n$ is powerful but not a perfect power. For example, 864 and 1800 are Achilles numbers: $864 = 2^5 \times 3^3$ and $1800 = 2^3 \times 3^2 \times 5^2$. +Ein positiver Integer $n$ ist eine Achilleszahl, wenn $n$ zwar mächtig, aber keine vollkommene Potenz ist. Zum Beispiel sind 864 und 1800 Achilleszahlen: $864 = 2^5 \mal 3^3$ und $1800 = 2^3 \mal 3^2 \mal 5^2$. -We shall call a positive integer $S$ a Strong Achilles number if both $S$ and $φ(S)$ are Achilles numbers. $φ$ denotes Euler's totient function. +Wir nennen einen positiven Integer $S$ eine starke Achilleszahl, wenn sowohl $S$ als auch $φ(S)$ Achilleszahlen sind. $φ$ bezeichnet die Eulersche Totalitätsfunktion. -For example, 864 is a Strong Achilles number: $φ(864) = 288 = 2^5 \times 3^2$. However, 1800 isn't a Strong Achilles number because: $φ(1800) = 480 = 2^5 \times 3^1 \times 5^1$. +Zum Beispiel ist 864 eine starke Achilleszahl: $φ(864) = 288 = 2^5 \mal 3^2$. Allerdings ist 1800 keine starke Achilleszahl, denn: $φ(1800) = 480 = 2^5 \mal 3^1 \mal 5^1$. -There are 7 Strong Achilles numbers below ${10}^4$ and 656 below ${10}^8$. +Es gibt 7 starke Achilleszahlen unter ${10}^4$ und 656 unter ${10}^8$. -How many Strong Achilles numbers are there below ${10}^{18}$? +Wie viele starke Achilleszahlen gibt es unter ${10}^{18}$? # --hints-- -`strongAchillesNumbers()` should return `1170060`. +`strongAchillesNumbers()` sollte `1170060` zurückgeben. ```js assert.strictEqual(strongAchillesNumbers(), 1170060); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-303-multiples-with-small-digits.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-303-multiples-with-small-digits.md index 108d8bd39fc..11eb0bdc07e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-303-multiples-with-small-digits.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-303-multiples-with-small-digits.md @@ -1,6 +1,6 @@ --- id: 5900f49b1000cf542c50ffae -title: 'Problem 303: Multiples with small digits' +title: 'Problem 303: Vielfache mit kleinen Ziffern' challengeType: 1 forumTopicId: 301957 dashedName: problem-303-multiples-with-small-digits @@ -8,17 +8,17 @@ dashedName: problem-303-multiples-with-small-digits # --description-- -For a positive integer $n$, define $f(n)$ as the least positive multiple of $n$ that, written in base 10, uses only digits $≤ 2$. +Definiere für einen positiven Integer $n$ $f(n)$ als das kleinste positive Vielfache von $n$, das, zur Basis 10 geschrieben, nur Ziffern $≤ 2$ enthält. -Thus $f(2) = 2$, $f(3) = 12$, $f(7) = 21$, $f(42) = 210$, $f(89) = 1\\,121\\,222$. +Also $f(2) = 2$, $f(3) = 12$, $f(7) = 21$, $f(42) = 210$, $f(89) = 1\,121\,222$. -Also, $\displaystyle\sum_{n = 1}^{100} \frac{f(n)}{n} = 11\\,363\\,107$. +Außerdem ist $\displaystyle\sum_{n = 1}^{100} \frac{f(n)}{n} = 11\\,363\\,107$. -Find $\displaystyle\sum_{n = 1}^{10\\,000} \frac{f(n)}{n}$. +Finde $\displaystyle\sum_{n = 1}^{10\\,000} \frac{f(n)}{n}$. # --hints-- -`multiplesWithSmallDigits()` should return `1111981904675169`. +`multiplesWithSmallDigits()` sollte `1111981904675169` zurückgeben. ```js assert.strictEqual(multiplesWithSmallDigits(), 1111981904675169); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-304-primonacci.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-304-primonacci.md index a4939940a8f..4ad76b88faa 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-304-primonacci.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-304-primonacci.md @@ -8,19 +8,19 @@ dashedName: problem-304-primonacci # --description-- -For any positive integer $n$ the function $\text{next_prime}(n)$ returns the smallest prime $p$ such that $p > n$. +Für jeden positiven Integer $n$ liefert die Funktion $\text{next_prime}(n)$ die kleinste Primzahl $p$, die $p > n$ entspricht. -The sequence $a(n)$ is defined by: $a(1) = \text{next_prime}({10}^{14})$ and $a(n) = \text{next_prime}(a(n - 1))$ for $n > 1$. +Die Folge $a(n)$ ist definiert durch: $a(1) = \text{next_prime}({10}^{14})$ und $a(n) = \text{next_prime}(a(n - 1))$ für $n > 1$. -The fibonacci sequence $f(n)$ is defined by: $f(0) = 0$, $f(1) = 1$ and $f(n) = f(n - 1) + f(n - 2)$ for $n > 1$. +Die Fibonacci-Folge $f(n)$ ist definiert durch: $f(0) = 0$, $f(1) = 1$ und $f(n) = f(n - 1) + f(n - 2)$ für $n > 1$. -The sequence $b(n)$ is defined as $f(a(n))$. +Die Folge $b(n)$ ist definiert als $f(a(n))$. -Find $\sum b(n)$ for $1≤n≤100\\,000$. Give your answer $\bmod 1\\,234\\,567\\,891\\,011$. +Finde $\sum b(n)$ for $1≤n≤100\\,000$. Gib deine Antwort $\bmod 1\\,234\\,567\\,891\\,011$. # --hints-- -`primonacci()` should return `283988410192`. +`primonacci()` sollte `283988410192` zurückgeben. ```js assert.strictEqual(primonacci(), 283988410192); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-305-reflexive-position.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-305-reflexive-position.md index 566e7b7b76c..85877e91f78 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-305-reflexive-position.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-305-reflexive-position.md @@ -8,19 +8,19 @@ dashedName: problem-305-reflexive-position # --description-- -Let's call $S$ the (infinite) string that is made by concatenating the consecutive positive integers (starting from 1) written down in base 10. +Nennen wir $S$ einen (unendlichen) String, der durch die Verkettung aufeinanderfolgender positiver Integer (beginnend mit 1) zum Basiswert 10 entsteht. -Thus, $S = 1234567891011121314151617181920212223242\ldots$ +Demzufolge: $S = 1234567891011121314151617181920212223242\ldots$ -It's easy to see that any number will show up an infinite number of times in $S$. +Es ist leicht zu erkennen, dass jede Zahl unendlich oft in $S$ vorkommt. -Let's call $f(n)$ the starting position of the $n^{\text{th}}$ occurrence of $n$ in $S$. For example, $f(1) = 1$, $f(5) = 81$, $f(12) = 271$ and $f(7780) = 111\\,111\\,365$. +Nennen wir $f(n)$ die Anfangsposition des $n^{\text{th}}$-Vorkommens von $n$ in $S$. Zum Beispiel ist $f(1) = 1$, $f(5) = 81$, $f(12) = 271$ und $f(7780) = 111\\,111\,365$. -Find $\sum f(3^k) for 1 ≤ k ≤ 13$. +Finde $\sum f(3^k) for 1 ≤ k ≤ 13$. # --hints-- -`reflexivePosition()` should return `18174995535140`. +`reflexivePosition()` sollte `18174995535140` zurückgeben. ```js assert.strictEqual(reflexivePosition(), 18174995535140); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-306-paper-strip-game.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-306-paper-strip-game.md index 3dd4604bc13..f13d7a4e8ab 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-306-paper-strip-game.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-306-paper-strip-game.md @@ -1,6 +1,6 @@ --- id: 5900f49f1000cf542c50ffb1 -title: 'Problem 306: Paper-strip Game' +title: 'Problem 306: Papierstreifen-Spiel' challengeType: 1 forumTopicId: 301960 dashedName: problem-306-paper-strip-game @@ -8,27 +8,27 @@ dashedName: problem-306-paper-strip-game # --description-- -The following game is a classic example of Combinatorial Game Theory: +Das folgende Spiel ist ein klassisches Beispiel für die kombinatorische Spieltheorie: -Two players start with a strip of $n$ white squares and they take alternate turns. On each turn, a player picks two contiguous white squares and paints them black. The first player who cannot make a move loses. +Zwei Spieler beginnen mit einem Streifen aus $n$ weißen Feldern und wechseln sich ab. In jedem Zug wählt ein Spieler zwei zusammenhängende weiße Quadrate aus und malt sie schwarz an. Der erste Spieler, der keinen Zug machen kann, hat verloren. -- $n = 1$: No valid moves, so the first player loses automatically. -- $n = 2$: Only one valid move, after which the second player loses. -- $n = 3$: Two valid moves, but both leave a situation where the second player loses. -- $n = 4$: There are three valid moves for the first player; who is able to win the game by painting the two middle squares. -- $n = 5$: Four valid moves for the first player (shown below in red); but no matter what the player does, the second player (blue) wins. +- $n = 1$: Keine gültigen Züge, also verliert der erste Spieler automatisch. +- $n = 2$: Nur ein gültiger Zug, nach dem der zweite Spieler verliert. +- $n = 3$: Zwei gültige Züge, aber beide führen zu einer Situation, in der der zweite Spieler verliert. +- $n = 4$: Es gibt drei gültige Züge für den ersten Spieler; er kann das Spiel gewinnen, indem er die beiden mittleren Felder anmalt. +- $n = 5$: Vier gültige Züge für den ersten Spieler (unten in rot dargestellt); aber egal, was der Spieler macht, der zweite Spieler (blau) gewinnt. -valid starting moves for strip with 5 squares +gültige Startzüge für Streifen mit 5 Feldern -So, for $1 ≤ n ≤ 5$, there are 3 values of $n$ for which the first player can force a win. +Für $1 ≤ n ≤ 5$ gibt es also 3 Werte von $n$, für die der erste Spieler einen Sieg erzwingen kann. -Similarly, for $1 ≤ n ≤ 50$, there are 40 values of $n$ for which the first player can force a win. +Analog dazu gibt es für $1 ≤ n ≤ 50$ 40 Werte von $n$, für die der erste Spieler einen Sieg erzwingen kann. -For $1 ≤ n ≤ 1\\,000\\,000$, how many values of $n$ are there for which the first player can force a win? +Für $1 ≤ n ≤ 1\\,000\\,000$, wie viele Werte von $n$ gibt es, für die der erste Spieler einen Sieg erzwingen kann? # --hints-- -`paperStripGame()` should return `852938`. +`paperStripGame()` sollte `852938` zurückgeben. ```js assert.strictEqual(paperStripGame(), 852938); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-307-chip-defects.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-307-chip-defects.md index 3f0fd2be0cb..07353a20aa9 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-307-chip-defects.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-307-chip-defects.md @@ -1,6 +1,6 @@ --- id: 5900f4a01000cf542c50ffb2 -title: 'Problem 307: Chip Defects' +title: 'Problem 307: Chip-Fehler' challengeType: 1 forumTopicId: 301961 dashedName: problem-307-chip-defects @@ -8,15 +8,15 @@ dashedName: problem-307-chip-defects # --description-- -$k$ defects are randomly distributed amongst $n$ integrated-circuit chips produced by a factory (any number of defects may be found on a chip and each defect is independent of the other defects). +$k$ Defekte sind zufällig auf $n$ Chips mit integrierten Schaltkreisen verteilt, die in einer Fabrik hergestellt werden (es können beliebig viele Defekte auf einem Chip gefunden werden, und jeder Defekt ist unabhängig von den anderen Defekten). -Let $p(k,n)$ represent the probability that there is a chip with at least 3 defects. For instance $p(3,7) ≈ 0.0204081633$. +Lasse $p(k,n)$ die Wahrscheinlichkeit sein, dass es einen Chip mit mindestens 3 Defekten gibt. Zum Beispiel: $p(3,7) ≈ 0.0204081633$. -Find $p(20\\,000, 1\\,000\\,000)$ and give your answer rounded to 10 decimal places in the form 0.abcdefghij +Finde $p(20\\,000, 1\\,000\\,000)$ und gib deine Antwort auf 10 Dezimalstellen in der Form 0.abcdefghij gerundet an # --hints-- -`chipDefects()` should return `0.7311720251`. +`chipDefects()` sollte `0.7311720251` zurückgeben. ```js assert.strictEqual(chipDefects(), 0.7311720251); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.md index 22f3cabc900..ec0d5c325a2 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.md @@ -1,6 +1,6 @@ --- id: 5900f4a11000cf542c50ffb3 -title: 'Problem 308: An amazing Prime-generating Automaton' +title: 'Problem 308: Ein erstaunlicher Primzahlen generierender Roboter' challengeType: 1 forumTopicId: 301962 dashedName: problem-308-an-amazing-prime-generating-automaton @@ -8,27 +8,27 @@ dashedName: problem-308-an-amazing-prime-generating-automaton # --description-- -A program written in the programming language Fractran consists of a list of fractions. +Ein in der Programmiersprache Fractran geschriebenes Programm besteht aus einer Liste von Brüchen. -The internal state of the Fractran Virtual Machine is a positive integer, which is initially set to a seed value. Each iteration of a Fractran program multiplies the state integer by the first fraction in the list which will leave it an integer. +Der interne Zustand der virtuellen Maschine von Fractran ist ein positiver Integer, der anfangs auf einen Startwert gesetzt wird. Bei jeder Iteration eines Fractran-Programms wird der Zustand der ganzen Zahl mit dem ersten Bruch in der Liste multipliziert, so dass eine ganze Zahl übrig bleibt. -For example, one of the Fractran programs that John Horton Conway wrote for prime-generation consists of the following 14 fractions: +Eines der Fractran-Programme, das John Horton Conway für die erste Generation geschrieben hat, besteht zum Beispiel aus den folgenden 14 Brüchen: $$\frac{17}{91}, \frac{78}{85}, \frac{19}{51}, \frac{23}{38}, \frac{29}{33}, \frac{77}{29}, \frac{95}{23}, \frac{77}{19}, \frac{1}{17}, \frac{11}{13}, \frac{13}{11}, \frac{15}{2}, \frac{1}{7}, \frac{55}{1}$$ -Starting with the seed integer 2, successive iterations of the program produce the sequence: +Ausgehend von der Startzahl 2 ergeben die aufeinanderfolgenden Iterationen des Programms die Sequenz: $$15, 825, 725, 1925, 2275, 425, \ldots, 68, \mathbf{4}, 30, \ldots, 136, \mathbf{8}, 60, \ldots, 544, \mathbf{32}, 240, \ldots$$ -The powers of 2 that appear in this sequence are $2^2, 2^3, 2^5, \ldots$. +Die Potenzen von 2, die in dieser Folge erscheinen, sind $2^2, 2^3, 2^5, \ldots$. -It can be shown that all the powers of 2 in this sequence have prime exponents and that all the primes appear as exponents of powers of 2, in proper order! +Es kann gezeigt werden, dass alle 2er-Potenzen in dieser Folge Primzahl-Exponenten haben und dass alle Primzahlen als Exponenten von 2er-Potenzen in der richtigen Reihenfolge auftreten! -If someone uses the above Fractran program to solve Project Euler Problem 7 (find the ${10001}^{\text{st}}$ prime), how many iterations would be needed until the program produces $2^{10001^{\text{st}}\text{ prime}}$? +Wenn jemand das obige Fractran-Programm verwendet, um das Projekt Euler-Problem 7 zu lösen (finde die ${10001}^{\text{st}}$-Primzahl), wie viele Iterationen wären dann nötig, bis das Programm $2^{10001^{\text{st}}\text{ prime}}$ liefert? # --hints-- -`primeGeneratingAutomation()` should return `1539669807660924`. +`primeGeneratingAutomation()` sollte `1539669807660924` zurückgeben. ```js assert.strictEqual(primeGeneratingAutomation(), 1539669807660924); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-309-integer-ladders.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-309-integer-ladders.md index 721b756f533..96a18fd0d8f 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-309-integer-ladders.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-309-integer-ladders.md @@ -1,6 +1,6 @@ --- id: 5900f4a11000cf542c50ffb4 -title: 'Problem 309: Integer Ladders' +title: 'Problem 309: Integer-Leitern' challengeType: 1 forumTopicId: 301963 dashedName: problem-309-integer-ladders @@ -8,19 +8,19 @@ dashedName: problem-309-integer-ladders # --description-- -In the classic "Crossing Ladders" problem, we are given the lengths $x$ and $y$ of two ladders resting on the opposite walls of a narrow, level street. We are also given the height $h$ above the street where the two ladders cross and we are asked to find the width of the street ($w$). +Bei dem klassischen Problem "Leitern zu überqueren" sind die Längen $x$ und $y$ zweier Leitern gegeben, die an den gegenüberliegenden Wänden einer schmalen, ebenen Straße stehen. Wir erhalten auch die Höhe $h$ über der Straße, in der sich die beiden Leitern kreuzen, und wir sollen die Breite der Straße ($w$) bestimmen. -ladders x and y, crossing at the height h, and resting on opposite walls of the street of width w +Leitern x und y, die sich in der Höhe h kreuzen und auf gegenüberliegenden Wänden der Straße mit der Breite w aufliegen -Here, we are only concerned with instances where all four variables are positive integers. For example, if $x = 70$, $y = 119$ and $h = 30$, we can calculate that $w = 56$. +Wir befassen uns hier nur mit Fällen, in denen alle vier Variablen positive Integer sind. Wenn zum Beispiel $x = 70$, $y = 119$ und $h = 30$, können wir berechnen, dass $w = 56$. -In fact, for integer values $x$, $y$, $h$ and $0 < x < y < 200$, there are only five triplets ($x$, $y$, $h$) producing integer solutions for $w$: (70, 119, 30), (74, 182, 21), (87, 105, 35), (100, 116, 35) and (119, 175, 40). +Tatsächlich gibt es für die ganzzahligen Werte $x$, $y$, $h$ und $0 < x < y < 200$ nur fünf Tripel ($x$, $y$, $h$), die ganzzahlige Lösungen für $w$ ergeben: (70, 119, 30), (74, 182, 21), (87, 105, 35), (100, 116, 35) und (119, 175, 40). -For integer values $x$, $y$, $h$ and $0 < x < y < 1\\,000\\,000$, how many triplets ($x$, $y$, $h$) produce integer solutions for $w$? +Für die ganzzahligen Werte $x$, $y$, $h$ und $0 < x < y < 1\,000\,000$, wie viele Tripel ($x$, $y$, $h$) ergeben ganzzahlige Lösungen für $w$? # --hints-- -`integerLadders()` should return `210139`. +`integerLadders()` sollte `210139` zurückgeben. ```js assert.strictEqual(integerLadders(), 210139); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-310-nim-square.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-310-nim-square.md index 4eacb352843..0f6e140a4c3 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-310-nim-square.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-310-nim-square.md @@ -1,6 +1,6 @@ --- id: 5900f4a21000cf542c50ffb5 -title: 'Problem 310: Nim Square' +title: 'Problem 310: Nim Quadrat' challengeType: 1 forumTopicId: 301966 dashedName: problem-310-nim-square @@ -8,19 +8,19 @@ dashedName: problem-310-nim-square # --description-- -Alice and Bob play the game Nim Square. +Alice und Bob spielen das Spiel Nim Quadrat. -Nim Square is just like ordinary three-heap normal play Nim, but the players may only remove a square number of stones from a heap. +Nim Square ist genau wie das normale Nim-Spiel mit drei Haufen, aber die Spieler dürfen nur eine quadratische Anzahl von Steinen von einem Haufen entfernen. -The number of stones in the three heaps is represented by the ordered triple ($a$, $b$, $c$). +Die Anzahl der Steine in den drei Haufen wird durch das geordnete Tripel ($a$, $b$, $c$) dargestellt. -If $0 ≤ a ≤ b ≤ c ≤ 29$ then the number of losing positions for the next player is 1160. +Wenn $0 ≤ a ≤ b ≤ c ≤ 29$, dann ist die Anzahl der Verlustpositionen für den nächsten Spieler 1160. -Find the number of losing positions for the next player if $0 ≤ a ≤ b ≤ c ≤ 100\\,000$. +Finde die Anzahl der Verlustpositionen für den nächsten Spieler, wenn $0 ≤ a ≤ b ≤ c ≤ 100\\.000$. # --hints-- -`nimSquare()` should return `2586528661783`. +`nimSquare()` sollte `2586528661783` zurückgeben. ```js assert.strictEqual(nimSquare(), 2586528661783); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-311-biclinic-integral-quadrilaterals.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-311-biclinic-integral-quadrilaterals.md index 97736d98034..a53012d0286 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-311-biclinic-integral-quadrilaterals.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-311-biclinic-integral-quadrilaterals.md @@ -8,23 +8,23 @@ dashedName: problem-311-biclinic-integral-quadrilaterals # --description-- -$ABCD$ is a convex, integer sided quadrilateral with $1 ≤ AB < BC < CD < AD$. +$ABCD$ ist ein konvexes, ganzseitiges Viereck mit $1 ≤ AB < BC < CD < AD$. -$BD$ has integer length. $O$ is the midpoint of $BD$. $AO$ has integer length. +$BD$ hat eine ganzzahlige Länge. $O$ ist der Mittelpunkt von $BD$. $AO$ hat eine ganzzahlige Länge. -We'll call $ABCD$ a biclinic integral quadrilateral if $AO = CO ≤ BO = DO$. +Wir nennen $ABCD$ ein biclinic integral quadrilateral, wenn $AO = CO ≤ BO = DO$. -For example, the following quadrilateral is a biclinic integral quadrilateral: $AB = 19$, $BC = 29$, $CD = 37$, $AD = 43$, $BD = 48$ and $AO = CO = 23$. +Das folgende Viereck ist zum Beispiel ein biclinic integral quadrilateral: $AB = 19$, $BC = 29$, $CD = 37$, $AD = 43$, $BD = 48$ und $AO = CO = 23$. -quadrilateral ABCD, with point O, an midpoint of BD +Viereck ABCD, mit Punkt O, einem Mittelpunkt von BD -Let $B(N)$ be the number of distinct biclinic integral quadrilaterals $ABCD$ that satisfy ${AB}^2 + {BC}^2 + {CD}^2 + {AD}^2 ≤ N$. We can verify that $B(10\\,000) = 49$ and $B(1\\,000\\,000) = 38239$. +Lasse $B(N)$ die Anzahl der verschiedenen biclinic integral quadrilateral $ABCD$ sein, die ${AB}^2 + {BC}^2 + {CD}^2 + {AD}^2 ≤ N$ erfüllen. Wir können überprüfen, dass $B(10\\,000) = 49$ und $B(1\\,000\\,000) = 38239$. -Find $B(10\\,000\\,000\\,000)$. +Finde $B(10\\,000\\,000\\,000)$. # --hints-- -`biclinicIntegralQuadrilaterals()` should return `2466018557`. +`biclinicIntegralQuadrilaterals()` sollte `2466018557` zurückgeben. ```js assert.strictEqual(biclinicIntegralQuadrilaterals(), 2466018557); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-312-cyclic-paths-on-sierpiski-graphs.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-312-cyclic-paths-on-sierpiski-graphs.md index 122f28f97dc..2183a81acc9 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-312-cyclic-paths-on-sierpiski-graphs.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-312-cyclic-paths-on-sierpiski-graphs.md @@ -1,6 +1,6 @@ --- id: 5900f4a51000cf542c50ffb7 -title: 'Problem 312: Cyclic paths on Sierpiński graphs' +title: 'Problem 312: Zyklische Pfade auf Sierpiński-Graphen' challengeType: 1 forumTopicId: 301968 dashedName: problem-312-cyclic-paths-on-sierpiski-graphs @@ -8,26 +8,26 @@ dashedName: problem-312-cyclic-paths-on-sierpiski-graphs # --description-- -- A Sierpiński graph of order-1 ($S_1$) is an equilateral triangle. -- $S_{n + 1}$ is obtained from $S_n$ by positioning three copies of $S_n$ so that every pair of copies has one common corner. +- Ein Sierpiński-Graph der Ordnung-1 ($S_1$) ist ein gleichseitiges Dreieck. +- $S_{n + 1}$ erhält man aus $S_n$, indem man drei Kopien von $S_n$ so anordnet, dass jedes Paar von Kopien eine gemeinsame Ecke hat. -Sierpinski graphs of order-1 to order-5 +Sierpinski-Graphen der Ordnung-1 bis Ordnung-5 -Let $C(n)$ be the number of cycles that pass exactly once through all the vertices of $S_n$. For example, $C(3) = 8$ because eight such cycles can be drawn on $S_3$, as shown below: +Lasse $C(n)$ die Anzahl der Zyklen sein, die genau einmal durch alle Scheitelpunkte von $S_n$ gehen. Zum Beispiel ist $C(3) = 8$, weil acht solcher Zyklen auf $S_3$ gezeichnet werden können, wie unten gezeigt: -eight cycles that pass exactly once through all vertices of S_3 +acht Zyklen, die genau einmal durch alle Scheitelpunkte von S_3 verlaufen -It can also be verified that: +Es kann auch bestätigt werden, dass: $$\begin{align} & C(1) = C(2) = 1 \\\\ & C(5) = 71\\,328\\,803\\,586\\,048 \\\\ & C(10 000)\bmod {10}^8 = 37\\,652\\,224 \\\\ & C(10 000)\bmod {13}^8 = 617\\,720\\,485 \\\\ \end{align}$$ -Find $C(C(C(10\\,000)))\bmod {13}^8$. +Finde $C(C(C(10\\,000)))\bmod {13}^8$. # --hints-- -`pathsOnSierpinskiGraphs()` should return `324681947`. +`pathsOnSierpinskiGraphs()` sollte `324681947` zurückgeben. ```js assert.strictEqual(pathsOnSierpinskiGraphs(), 324681947); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-313-sliding-game.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-313-sliding-game.md index 8f5726b71f4..0455714fbf0 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-313-sliding-game.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-313-sliding-game.md @@ -1,6 +1,6 @@ --- id: 5900f4a61000cf542c50ffb8 -title: 'Problem 313: Sliding game' +title: 'Problem 313: Schiebespiel' challengeType: 1 forumTopicId: 301969 dashedName: problem-313-sliding-game @@ -8,21 +8,21 @@ dashedName: problem-313-sliding-game # --description-- -In a sliding game a counter may slide horizontally or vertically into an empty space. The objective of the game is to move the red counter from the top left corner of a grid to the bottom right corner; the space always starts in the bottom right corner. For example, the following sequence of pictures show how the game can be completed in five moves on a 2 by 2 grid. +Bei einem Schiebespiel kann ein Spielstein horizontal oder vertikal in ein leeres Feld gleiten. Ziel des Spiels ist es, den roten Spielstein von der linken oberen Ecke eines Gitters in die rechte untere Ecke zu bringen; das Feld beginnt immer in der rechten unteren Ecke. Die folgende Bildfolge zeigt zum Beispiel, wie das Spiel in fünf Zügen auf einem 2 x 2-Raster beendet werden kann. -completing game in five moves on grid 2x2 +Spiel in fünf Zügen auf einem 2x2-Gitterfeld abschließen -Let $S(m, n)$ represent the minimum number of moves to complete the game on an $m$ by $n$ grid. For example, it can be verified that $S(5, 4) = 25$. +Lasse $S(m, n)$ die minimale Anzahl von Zügen sein, um das Spiel auf einem $m$ mal $n$ Gitter zu beenden. Es kann zum Beispiel nachgewiesen werden, dass $S(5, 4) = 25$ ist. -initial grid state and final grid state for game on grid 5x4 +Anfangszustand des Gitters und Endzustand des Gitters für das Spiel auf dem Gitter 5x4 -There are exactly 5482 grids for which $S(m, n) = p^2$, where $p < 100$ is prime. +Es gibt genau 5482 Netze, für die $S(m, n) = p^2$ ist, wobei $p < 100$ eine Primzahl ist. -How many grids does $S(m, n) = p^2$, where $p < {10}^6$ is prime? +Wie viele Gitter hat $S(m, n) = p^2$, wenn $p < {10}^6$ eine Primzahl ist? # --hints-- -`slidingGame()` should return `2057774861813004`. +`slidingGame()` sollte `2057774861813004` zurückgeben. ```js assert.strictEqual(slidingGame(), 2057774861813004); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-314-the-mouse-on-the-moon.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-314-the-mouse-on-the-moon.md index 899395668c7..13757059447 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-314-the-mouse-on-the-moon.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-314-the-mouse-on-the-moon.md @@ -1,6 +1,6 @@ --- id: 5900f4a71000cf542c50ffb9 -title: 'Problem 314: The Mouse on the Moon' +title: 'Problem 314: Die Maus auf dem Mond' challengeType: 1 forumTopicId: 301970 dashedName: problem-314-the-mouse-on-the-moon @@ -8,23 +8,23 @@ dashedName: problem-314-the-mouse-on-the-moon # --description-- -The moon has been opened up, and land can be obtained for free, but there is a catch. You have to build a wall around the land that you stake out, and building a wall on the moon is expensive. Every country has been allotted a 500 m by 500 m square area, but they will possess only that area which they wall in. 251001 posts have been placed in a rectangular grid with 1 meter spacing. The wall must be a closed series of straight lines, each line running from post to post. +Der Mond wurde erschlossen, und Land kann kostenlos erworben werden, aber es gibt einen Haken. Man muss eine Mauer um das Land bauen, das man absteckt, und der Bau einer Mauer auf dem Mond ist teuer. Jedem Land wurde ein 500 m x 500 m zugeteilt, aber es wird nur das Gebiet besitzen, was sie auch mit einer Mauer umbauen. 251001 Pfosten wurden in einem rechteckigen Raster mit einem Abstand von 1 Meter aufgestellt. Die Wand muss eine geschlossene Reihe von geraden Linien sein, die von Pfosten zu Pfosten verlaufen. -The bigger countries of course have built a 2000 m wall enclosing the entire 250 000 $\text{m}^2$ area. The Duchy of Grand Fenwick, has a tighter budget, and has asked you (their Royal Programmer) to compute what shape would get best maximum $\frac{\text{enclosed-area}}{\text{wall-length}}$ ratio. +Die größeren Länder haben natürlich eine 2000 m lange Mauer gebaut, die das gesamte 250 000 $\text{m}^2$ große Gebiet umschließt. Das Herzogtum von Grand Fenwick hat ein knapperes Budget und hat dich (ihren königlichen Programmierer) gebeten, zu berechnen, welche Form das beste maximale Verhältnis $\frac{\text{enclosed-area}}{\text{wall-length}}$ erzielen würde. -You have done some preliminary calculations on a sheet of paper. For a 2000 meter wall enclosing the 250 000 $\text{m}^2$ area the $\frac{\text{enclosed-area}}{\text{wall-length}}$ ratio is 125. +Du hast einige vorläufige Berechnungen auf einem Blatt Papier durchgeführt. Für eine 2000 Meter lange Wand, die eine Fläche von 250 000 $\text{m}^2$ umschließt, beträgt das Verhältnis $\frac{\text{enclosed-area}}{\text{wall-length}}$ 125. -Although not allowed, but to get an idea if this is anything better: if you place a circle inside the square area touching the four sides the area will be equal to $π \times {250}^2 \text{m}^2$ and the perimeter will be $π \times 500 \text{m}$, so the $\frac{\text{enclosed-area}}{\text{wall-length}}$ ratio will also be 125. +Es ist zwar nicht erlaubt, aber um eine Vorstellung davon zu bekommen, ob diese Möglichkeit besser ist: Wenn man einen Kreis in die quadratische Fläche legt, der die vier Seiten berührt, ist die Fläche gleich $π \times {250}^2 \text{m}^2$ und der Umfang $π \times 500 \text{m}$, so dass das Verhältnis $\frac{\text{enclosed-area}}{\text{wall-length}}$ ebenfalls 125 ist. -However, if you cut off from the square four triangles with sides 75 m, 75 m and $75\sqrt{2}$ m the total area becomes 238750 $\text{m}^2$ and the perimeter becomes $1400 + 300\sqrt{2}$ m. So this gives an $\frac{\text{enclosed-area}}{\text{wall-length}}$ ratio of 130.87, which is significantly better. +Schneidet man jedoch aus dem Quadrat vier Dreiecke mit den Seiten 75 m, 75 m und $75\sqrt{2}$ m ab, so ergibt sich eine Gesamtfläche von 238750 $\text{m}^2$ und ein Umfang von $1400 + 300\sqrt{2}$ m. Daraus ergibt sich ein $\frac{\text{enclosed-area}}{\text{wall-length}}$-Verhältnis von 130.87, das deutlich besser ist. -picture showing difference in enclosed-area between circle and square with cut off four triangles +Bild, das den Unterschied im eingeschlossenen Bereich zwischen Kreis und Quadrat mit abgeschnittenen vier Dreiecken zeigt -Find the maximum $\frac{\text{enclosed-area}}{\text{wall-length}}$ ratio. Give your answer rounded to 8 places behind the decimal point in the form abc.defghijk. +Ermittle das maximale $\frac{\text{enclosed-area}}{\text{wall-length}}$-Verhältnis. Gib deine Antwort auf 8 Stellen hinter dem Komma gerundet in der Form abc.defghijk an. # --hints-- -`theMouseOnTheMoon()` should return `132.52756426`. +`theMouseOnTheMoon()` sollte `132.52756426` zurückgeben. ```js assert.strictEqual(theMouseOnTheMoon(), 132.52756426); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-315-digital-root-clocks.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-315-digital-root-clocks.md index 59389d4a7ff..6940c1e9600 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-315-digital-root-clocks.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-315-digital-root-clocks.md @@ -8,45 +8,45 @@ dashedName: problem-315-digital-root-clocks # --description-- -animation of Sam's and Max's clocks calculating digital roots starting from 137 +Animation von Sams und Max' Uhren, die digitale Wurzeln ausgehend von 137 berechnen -Sam and Max are asked to transform two digital clocks into two "digital root" clocks. +Sam und Max sollen zwei Digitaluhren in zwei "Digitale Wurzel-Uhren" umwandeln. -A digital root clock is a digital clock that calculates digital roots step by step. +Eine digitale Wurzel-Uhr ist eine digitale Uhr, die Schritt für Schritt digitale Wurzeln berechnet. -When a clock is fed a number, it will show it and then it will start the calculation, showing all the intermediate values until it gets to the result. For example, if the clock is fed the number 137, it will show: `137` → `11` → `2` and then it will go black, waiting for the next number. +Wenn eine Uhr mit einer Zahl gefüttert wird, zeigt sie diese an und beginnt dann mit der Berechnung, wobei sie alle Zwischenwerte anzeigt, bis sie zum Ergebnis kommt. Wenn die Uhr zum Beispiel mit der Zahl 137 gefüttert wird, zeigt sie: `137` → `11` → `2` an und wird dann schwarz, während sie auf die nächste Zahl wartet. -Every digital number consists of some light segments: three horizontal (top, middle, bottom) and four vertical (top-left, top-right, bottom-left, bottom-right). Number `1` is made of vertical top-right and bottom-right, number `4` is made by middle horizontal and vertical top-left, top-right and bottom-right. Number `8` lights them all. +Jede digitale Zahl besteht aus einigen Lichtsegmenten: drei horizontalen (oben, Mitte, unten) und vier vertikalen (oben links, oben rechts, unten links, unten rechts). Die Zahl `1` besteht aus vertikal oben-rechts und unten-rechts, die Zahl `4` besteht aus der mittleren Horizontalen und Vertikalen oben-links, oben-rechts und unten-rechts. Nummer `8` beleuchtet sie alle. -The clocks consume energy only when segments are turned on/off. To turn on a `2` will cost 5 transitions, while a `7` will cost only 4 transitions. +Die Uhren verbrauchen nur dann Energie, wenn die Segmente ein- und ausgeschaltet werden. Das Einschalten einer `2` kostet 5 Übergänge, während ein `7` nur 4 Übergänge kostet. -Sam and Max built two different clocks. +Sam und Max haben zwei verschiedene Uhren gebaut. -Sam's clock is fed e.g. number 137: the clock shows `137`, then the panel is turned off, then the next number (`11`) is turned on, then the panel is turned off again and finally the last number (`2`) is turned on and, after some time, off. +Sams Uhr wird z.B. mit der Nummer 137 gespeist: die Uhr zeigt `137`, dann wird das Panel ausgeschaltet, dann wird die nächste Zahl (`11`) eingeschaltet, dann wird das Panel wieder ausgeschaltet und schließlich wird die letzte Zahl (`2`) ein- und nach einiger Zeit wieder ausgeschaltet. -For the example, with number 137, Sam's clock requires: +Für das Beispiel mit der Nummer 137 benötigt Sams Uhr: -- `137`: $(2 + 5 + 4) × 2 = 22$ transitions (`137` on/off). -- `11`: $(2 + 2) × 2 = 8$ transitions (`11` on/off). -- `2`: $(5) × 2 = 10$ transitions (`2` on/off). +- `137`: $(2 + 5 + 4) × 2 = 22$ Übergänge (`137` an/aus). +- `11`: $(2 + 2) × 2 = 8$ Übergänge (`11` an/aus). +- `2`: $(5) × 2 = 10$ Übergänge (`2` an/aus). -For a grand total of 40 transitions. +Für eine Gesamtsumme von 40 Übergängen. -Max's clock works differently. Instead of turning off the whole panel, it is smart enough to turn off only those segments that won't be needed for the next number. +Max's Uhr funktioniert anders. Anstatt das gesamte Panel abzuschalten, ist sie klug genug, nur jene Segmente auszuschalten, die für die nächste Nummer nicht benötigt werden. -For number 137, Max's clock requires: +Für die Nummer 137 ist Max' Uhr erforderlich: -- `137` : $2 + 5 + 4 = 11$ transitions (`137` on), $7$ transitions (to turn off the segments that are not needed for number `11`). +- `137` : $2 + 5 + 4 = 11$ Übergänge (`137` angeschaltet), $7$ Übergänge (um die Segmente auszuschalten, die für Nummer `11` nicht benötigt werden). - `11` : $0$ transitions (number `11` is already turned on correctly), $3$ transitions (to turn off the first `1` and the bottom part of the second `1`; the top part is common with number `2`). -- `2` : $4$ transitions (to turn on the remaining segments in order to get a `2`), $5$ transitions (to turn off number `2`). +- `2` : $4$ Übergänge (um die verbleibenden Segmente einzuschalten, um eine `2` zu erhalten), $5$ Übergänge (um die Zahlen `2` auszuschalten). -For a grand total of 30 transitions. +Für eine Gesamtsumme von 30 Übergängen. -Of course, Max's clock consumes less power than Sam's one. The two clocks are fed all the prime numbers between $A = {10}^7$ and $B = 2 × {10}^7$. Find the difference between the total number of transitions needed by Sam's clock and that needed by Max's one. +Natürlich verbraucht die Uhr von Max weniger Strom als die von Sam. Den beiden Uhren werden alle Primzahlen zwischen $A = {10}^7$ und $B = 2 × {10}^7$ zugeführt. Ermittle die Differenz zwischen der Gesamtzahl der Übergänge, die Sams Uhr benötigt, und derjenigen, die Max' Uhr benötigt. # --hints-- -`digitalRootClocks()` should return `13625242`. +`digitalRootClocks()` sollte `13625242` zurückgeben. ```js assert.strictEqual(digitalRootClocks(), 13625242); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-317-firecracker.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-317-firecracker.md index f9715cfd8df..fa3e7ab5e0e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-317-firecracker.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-317-firecracker.md @@ -1,6 +1,6 @@ --- id: 5900f4aa1000cf542c50ffbc -title: 'Problem 317: Firecracker' +title: 'Problem 317: Feuerwerkskörper' challengeType: 1 forumTopicId: 301973 dashedName: problem-317-firecracker @@ -8,15 +8,15 @@ dashedName: problem-317-firecracker # --description-- -A firecracker explodes at a height of 100 m above level ground. It breaks into a large number of very small fragments, which move in every direction; all of them have the same initial velocity of 20 $\frac{\text{m}}{\text{s}}$. +Ein Feuerwerkskörper explodiert in einer Höhe von 100 m über dem Boden. Es zerbricht in eine große Anzahl sehr kleiner Fragmente, die sich in alle Richtungen bewegen; alle haben die gleiche Anfangsgeschwindigkeit von 20 $\frac{\text{m}}{\text{s}}$. -We assume that the fragments move without air resistance, in a uniform gravitational field with $g=9.81 \frac{\text{m}}{\text{s}^2}$. +Wir nehmen an, dass sich die Fragmente ohne Luftwiderstand in einem einheitlichen Gravitationsfeld mit $g=9,81 \frac{\text{m}}{\text{s}^2}$ bewegen. -Find the volume (in $\text{m}^3$) of the region through which the fragments move before reaching the ground. Give your answer rounded to four decimal places. +Bestimme das Volumen (in $\text{m}^3$) der Region, durch die sich die Bruchstücke bewegen, bevor sie den Boden erreichen. Gib deine Antwort auf vier Dezimalstellen gerundet an. # --hints-- -`firecracker()` should return `1856532.8455`. +`firecracker()` sollte `1856532.8455` zurückgeben. ```js assert.strictEqual(firecracker(), 1856532.8455); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-318-2011-nines.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-318-2011-nines.md index f4b4f8315b5..03e42ed056b 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-318-2011-nines.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-318-2011-nines.md @@ -1,6 +1,6 @@ --- id: 5900f4ab1000cf542c50ffbd -title: 'Problem 318: 2011 nines' +title: 'Problem 318: 2011 Neunen' challengeType: 1 forumTopicId: 301974 dashedName: problem-318-2011-nines @@ -8,9 +8,9 @@ dashedName: problem-318-2011-nines # --description-- -Consider the real number $\sqrt{2} + \sqrt{3}$. +Betrachte die reelle Zahl $\sqrt{2} + \sqrt{3}$. -When we calculate the even powers of $\sqrt{2} + \sqrt{3}$ we get: +Wenn wir die gleichen Kräfte von $\sqrt{2} + \sqrt{3}$ berechnen, erhalten wir: $$\begin{align} & {(\sqrt{2} + \sqrt{3})}^2 = 9.898979485566356\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^4 = 97.98979485566356\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^6 = 969.998969071069263\ldots \\\\ @@ -18,19 +18,19 @@ $$\begin{align} & {(\sqrt{2} + \sqrt{3})}^2 = 9.898979485566356\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{12} = 940897.9999989371855\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{14} = 9313929.99999989263\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{16} = 92198401.99999998915\ldots \\\\ \end{align}$$ -It looks like that the number of consecutive nines at the beginning of the fractional part of these powers is non-decreasing. In fact it can be proven that the fractional part of ${(\sqrt{2} + \sqrt{3})}^{2n}$ approaches 1 for large $n$. +Es sieht so aus, als ob die Anzahl der aufeinanderfolgenden Neunen am Anfang des gebrochenen Teils dieser Potenzen nicht abnehmend ist. Tatsächlich kann nachgewiesen werden, dass für große $n$ der Bruchteil von ${(\sqrt{2} + \sqrt{3})}^{2n}$ sich 1 nähert. -Consider all real numbers of the form $\sqrt{p} + \sqrt{q}$ with $p$ and $q$ positive integers and $p < q$, such that the fractional part of ${(\sqrt{p} + \sqrt{q})}^{2n}$ approaches 1 for large $n$. +Betrachte alle realen Zahlen der Form $\sqrt{p} + \sqrt{q}$ mit $p$ und $q$ positiven Integern und $p < q$ so, dass der Bruchteil von ${(\sqrt{p} + \sqrt{q})}^{2n}$ sich 1 annähert für große $n$. -Let $C(p,q,n)$ be the number of consecutive nines at the beginning of the fractional part of ${(\sqrt{p} + \sqrt{q})}^{2n}$. +Lasse $C(p,q,n)$ die Anzahl der aufeinanderfolgenden Neunen am Anfang des Bruchteils von ${(\sqrt{p} + \sqrt{q})}^{2n}$ sein. -Let $N(p,q)$ be the minimal value of $n$ such that $C(p,q,n) ≥ 2011$. +Lasse $N(p,q)$ der minimale Wert von $n$ sein, sodass $C(p,q,n) ≥ 2011$ ist. -Find $\sum N(p,q)$ for $p + q ≤ 2011$. +Finde $\sum N(p,q)$ für $p + q ≤ 2011$. # --hints-- -`twoThousandElevenNines()` should return `709313889`. +`twoThousandElevenNines()` sollte `709313889` zurückgeben. ```js assert.strictEqual(twoThousandElevenNines(), 709313889); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-319-bounded-sequences.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-319-bounded-sequences.md index 36341fac54b..032e0581404 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-319-bounded-sequences.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-319-bounded-sequences.md @@ -1,6 +1,6 @@ --- id: 5900f4ab1000cf542c50ffbe -title: 'Problem 319: Bounded Sequences' +title: 'Problem 319: Begrenzte Sequenzen' challengeType: 1 forumTopicId: 301975 dashedName: problem-319-bounded-sequences @@ -8,21 +8,21 @@ dashedName: problem-319-bounded-sequences # --description-- -Let $x_1, x_2, \ldots, x_n$ be a sequence of length $n$ such that: +Lasse $x_1, x_2, \ldots, x_n$ eine Folge der Länge $n$ sein, für die gilt: - $x_1 = 2$ -- for all $1 < i ≤ n : x_{i - 1} < x_i$ -- for all $i$ and $j$ with $1 ≤ i, j ≤ n : {(x_i)}^j < {(x_j + 1)}^i$ +- für alle $1 < i ≤ n : x_{i - 1} < x_i$ +- für alle $i$ und $j$ mit $1 ≤ i, j ≤ n : {(x_i)}^j < {(x_j + 1)}^i$ -There are only five such sequences of length 2, namely: {2,4}, {2,5}, {2,6}, {2,7} and {2,8}. There are 293 such sequences of length 5; three examples are given below: {2,5,11,25,55}, {2,6,14,36,88}, {2,8,22,64,181}. +Es gibt nur fünf solcher Sequenzen der Länge 2, nämlich: {2,4}, {2,5}, {2,6}, {2,7} und {2,8}. Es gibt 293 solcher Sequenzen der Länge 5, drei Beispiele werden unten genannt: {2,5,11,25,55}, {2,6,14,36,88}, {2,8,22,64,181}. -Let $t(n)$ denote the number of such sequences of length $n$. You are given that $t(10) = 86195$ and $t(20) = 5227991891$. +Lasse $t(n)$ die Anzahl solcher Sequenzen der Länge $n$ bezeichnen. Dir wird angegeben, dass $t(10) = 86195$ und $t(20) = 5227991891$. -Find $t({10}^{10})$ and give your answer modulo $10^9$. +Finde $t({10}^{10})$ und gib deine Antwort modulo $10^9$. # --hints-- -`boundedSequences()` should return `268457129`. +`boundedSequences()` sollte `268457129` zurückgeben. ```js assert.strictEqual(boundedSequences(), 268457129); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.md index b0f0cc5c6ae..fbe74ba41d7 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.md @@ -8,17 +8,17 @@ dashedName: problem-320-factorials-divisible-by-a-huge-integer # --description-- -Let $N(i)$ be the smallest integer $n$ such that $n!$ is divisible by $(i!)^{1234567890}$ +Lasse $N(i)$ die kleinste ganze Zahl $n$ sein, sodass $n!$ durch $(i!)^{1234567890}$ teilbar ist -Let $S(u) = \sum N(i)$ for $10 ≤ i ≤ u$. +Lasse $S(u) = \sum N(i)$ für $10 ≤ i ≤ u$ sein. $S(1000)=614\\,538\\,266\\,565\\,663$. -Find $S(1\\,000\\,000)\bmod {10}^{18}$. +Finde $S(1\\,000\\,000)\bmod {10}^{18}$. # --hints-- -`divisibleByHugeInteger()` should return `278157919195482660`. +`divisibleByHugeInteger()` sollte `278157919195482660` zurückgeben. ```js assert.strictEqual(divisibleByHugeInteger(), 278157919195482660); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-321-swapping-counters.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-321-swapping-counters.md index 177610fd3c7..47711fc0f22 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-321-swapping-counters.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-321-swapping-counters.md @@ -1,6 +1,6 @@ --- id: 5900f4ae1000cf542c50ffc0 -title: 'Problem 321: Swapping Counters' +title: 'Problem 321: Spielsteine vertauschen' challengeType: 1 forumTopicId: 301978 dashedName: problem-321-swapping-counters @@ -8,25 +8,25 @@ dashedName: problem-321-swapping-counters # --description-- -A horizontal row comprising of $2n + 1$ squares has $n$ red counters placed at one end and $n$ blue counters at the other end, being separated by a single empty square in the center. For example, when $n = 3$. +Eine horizontale Reihe aus $2n + 1$ Quadraten hat $n$ rote Spielsteine an einem Ende und $n$ blaue Spielsteine am anderen Ende, die durch ein einziges leeres Quadrat in der Mitte getrennt sind. Zum Beispiel, wenn $n = 3$. -three squares with red and blue counters placed on opposite ends of the row, separated by one empty square +drei Quadrate mit roten und blauen Zählern an den gegenüberliegenden Enden der Reihe, getrennt durch ein leeres Feld -A counter can move from one square to the next (slide) or can jump over another counter (hop) as long as the square next to that counter is unoccupied. +Ein Spielstein kann sich von einem Feld zum nächsten bewegen (schieben) oder über einen anderen Spielstein springen (hüpfen), solange das Feld neben diesem Spielstein unbesetzt ist. -allowed moves of the counter +erlaubte Züge des Spielsteins -Let $M(n)$ represent the minimum number of moves/actions to completely reverse the positions of the colored counters; that is, move all the red counters to the right and all the blue counters to the left. +Lasse $M(n)$ die minimale Anzahl von Zügen/Aktionen sein, um die Positionen der farbigen Spielsteine vollständig umzukehren, d.h. alle roten Spielsteine nach rechts und alle blauen Spielsteine nach links zu bewegen. -It can be verified $M(3) = 15$, which also happens to be a triangle number. +Es kann nachgewiesen werden, dass $M(3) = 15$ ist, was zufällig auch eine Dreieckszahl ist. -If we create a sequence based on the values of n for which $M(n)$ is a triangle number then the first five terms would be: 1, 3, 10, 22, and 63, and their sum would be 99. +Wenn wir eine Sequenz erstellen, die auf den Werten von n basiert, für die $M(n)$ eine Dreieckszahl ist, dann wären die ersten fünf Terme: 1, 3, 10, 22, und 63, und ihre Summe wäre 99. -Find the sum of the first forty terms of this sequence. +Finde die Summe der ersten vierzig Begriffe dieser Folge. # --hints-- -`swappingCounters()` should return `2470433131948040`. +`swappingCounters()` sollte `2470433131948040` zurückgeben. ```js assert.strictEqual(swappingCounters(), 2470433131948040); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-322-binomial-coefficients-divisible-by-10.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-322-binomial-coefficients-divisible-by-10.md index 2c1725a5c4b..c7228985a45 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-322-binomial-coefficients-divisible-by-10.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-322-binomial-coefficients-divisible-by-10.md @@ -1,6 +1,6 @@ --- id: 5900f4af1000cf542c50ffc1 -title: 'Problem 322: Binomial coefficients divisible by 10' +title: 'Problem 322: Binomialkoeffizienten teilbar durch 10' challengeType: 1 forumTopicId: 301979 dashedName: problem-322-binomial-coefficients-divisible-by-10 @@ -8,15 +8,15 @@ dashedName: problem-322-binomial-coefficients-divisible-by-10 # --description-- -Let $T(m, n)$ be the number of the binomial coefficients ${}^iC_n$ that are divisible by 10 for $n ≤ i < m$ ($i$, $m$ and $n$ are positive integers). +Lasse $T(m, n)$ die Anzahl der Binomialkoeffizienten ${}^iC_n$ sein, die durch 10 teilbar sind für $n ≤ i < m$ ($i$, $m$ und $n$ sind positive ganze Zahlen). -You are given that $T({10}^9, {10}^7 - 10) = 989\\,697\\,000$. +Folgendes ist gegeben: $T({10}^9, {10}^7 - 10) = 989\\,697\\,000$. -Find $T({10}^{18}, {10}^{12} - 10)$. +Finde $T({10}^{18}, {10}^{12} - 10)$. # --hints-- -`binomialCoefficientsDivisibleBy10()` should return `999998760323314000`. +`binomialCoefficientsDivisibleBy10()` sollte `999998760323314000` zurückgeben. ```js assert.strictEqual(binomialCoefficientsDivisibleBy10(), 999998760323314000); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-323-bitwise-or-operations-on-random-integers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-323-bitwise-or-operations-on-random-integers.md index 7cd5acf36cc..a878377ffd2 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-323-bitwise-or-operations-on-random-integers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-323-bitwise-or-operations-on-random-integers.md @@ -8,20 +8,20 @@ dashedName: problem-323-bitwise-or-operations-on-random-integers # --description-- -Let $y_0, y_1, y_2, \ldots$ be a sequence of random unsigned 32 bit integers (i.e. $0 ≤ y_i < 2^{32}$, every value equally likely). +Lasse $y_0, y_1, y_2, \ldots$ eine Abfolge zufälliger vorzeichenloser 32-Bit-Ganzzahlen (d.h. $0 ≤ y_i < 2^{32}$, jeder Wert gleich wahrscheinlich) sein. -For the sequence $x_i$ the following recursion is given: +Für die Abfolge $x_i$ ist die folgende Rekursion gegeben: -- $x_0 = 0$ and -- $x_i = x_{i - 1} \mathbf{|} y_{i - 1}$, for $i > 0$. ($\mathbf{|}$ is the bitwise-OR operator) +- $x_0 = 0$ und +- $x_i = x_{i - 1} \mathbf{|} y_{i - 1}$, für $i > 0$. ($\mathbf{|}$ is the bitwise-OR operator) -It can be seen that eventually there will be an index $N$ such that $x_i = 2^{32} - 1$ (a bit-pattern of all ones) for all $i ≥ N$. +Man kann sehen, dass es schließlich einen Index $N$ gibt, sodass $x_i = 2^{32} - 1$ (ein Bitmuster aller Einsen) für alle $i ≥ N$. -Find the expected value of $N$. Give your answer rounded to 10 digits after the decimal point. +Finde den erwarteten Wert von $N$. Gebe deine Antwort auf 10 Stellen nach dem Komma gerundet an. # --hints-- -`bitwiseOrOnRandomIntegers()` should return `6.3551758451`. +`bitwiseOrOnRandomIntegers()` sollte `6.3551758451` zurückgeben. ```js assert.strictEqual(bitwiseOrOnRandomIntegers(), 6.3551758451); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-324-building-a-tower.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-324-building-a-tower.md index e79296a5f0f..142d191cb6e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-324-building-a-tower.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-324-building-a-tower.md @@ -1,6 +1,6 @@ --- id: 5900f4b11000cf542c50ffc3 -title: 'Problem 324: Building a tower' +title: 'Problem 324: Einen Turm bauen' challengeType: 1 forumTopicId: 301981 dashedName: problem-324-building-a-tower @@ -8,19 +8,19 @@ dashedName: problem-324-building-a-tower # --description-- -Let $f(n)$ represent the number of ways one can fill a $3×3×n$ tower with blocks of $2×1×1$. You're allowed to rotate the blocks in any way you like; however, rotations, reflections etc of the tower itself are counted as distinct. +$f(n)$ sei die Anzahl der Möglichkeiten, wie man einen $3×3×n$-Turm mit Blöcken von $2×1×1$ bauen kann. Die Blöcke dürfen beliebig gedreht werden; Drehungen, Spiegelungen usw. des Turms selbst werden jedoch gesondert gezählt. -For example (with $q = 100\\,000\\,007$): +Zum Beispiel (mit $q = 100\\,000\\,007$): $$\begin{align} & f(2) = 229, \\\\ & f(4) = 117\\,805, \\\\ & f(10)\bmod q = 96\\,149\\,360, \\\\ & f({10}^3)\bmod q = 24\\,806\\,056, \\\\ & f({10}^6)\bmod q = 30\\,808\\,124. \end{align}$$ -Find $f({10}^{10000})\bmod 100\\,000\\,007$. +Finde $f({10}^{10000})\bmod 100\\,000\\,007$. # --hints-- -`buildingTower()` should return `96972774`. +`buildingTower()` sollte `96972774` zurückgeben. ```js assert.strictEqual(buildingTower(), 96972774); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-325-stone-game-ii.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-325-stone-game-ii.md index b1392c1e246..d2a574f1a57 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-325-stone-game-ii.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-325-stone-game-ii.md @@ -1,6 +1,6 @@ --- id: 5900f4b11000cf542c50ffc4 -title: 'Problem 325: Stone Game II' +title: 'Problem 325: Steinspiel II' challengeType: 1 forumTopicId: 301982 dashedName: problem-325-stone-game-ii @@ -8,23 +8,23 @@ dashedName: problem-325-stone-game-ii # --description-- -A game is played with two piles of stones and two players. On each player's turn, the player may remove a number of stones from the larger pile. The number of stones removes must be a positive multiple of the number of stones in the smaller pile. +Ein Spiel wird mit zwei Steinhaufen und zwei Spielern gespielt. Wenn ein Spieler an der Reihe ist, darf er eine bestimmte Anzahl von Steinen vom größeren Haufen nehmen. Die Anzahl der entfernten Steine muss ein positives Vielfaches der Anzahl der Steine im kleineren Stapel sein. -E.g., let the ordered pair (6,14) describe a configuration with 6 stones in the smaller pile and 14 stones in the larger pile, then the first player can remove 6 or 12 stones from the larger pile. +Wenn z.B. das geordnete Paar (6,14) eine Konfiguration mit 6 Steinen im kleineren Haufen und 14 Steinen im größeren Stapel beschreibt, dann kann der erste Spieler 6 oder 12 Steine vom größeren Haufen entfernen. -The player taking all the stones from a pile wins the game. +Der Spieler, der alle Steine von einem Haufen genommen hat, gewinnt das Spiel. -A winning configuration is one where the first player can force a win. For example, (1,5), (2,6) and (3,12) are winning configurations because the first player can immediately remove all stones in the second pile. +Eine gewinnende Variante ist eine, bei der der erste Spieler einen Sieg erzwingen kann. Zum Beispiel sind (1,5), (2,6) und (3,12) Gewinnkombinationen, weil der erste Spieler sofort alle Steine des zweiten Haufens entnehmen kann. -A losing configuration is one where the second player can force a win, no matter what the first player does. For example, (2,3) and (3,4) are losing configurations: any legal move leaves a winning configuration for the second player. +Eine verlierende Kombinationen wäre, wenn der zweite Spieler einen Sieg erzwingen kann, egal was der erste Spieler tut. Zum Beispiel sind (2,3) und (3,4) Verliererkombinationen: Jeder legale Zug führt zu einem Gewinn des zweiten Spielers. -Define $S(N)$ as the sum of ($x_i + y_i$) for all losing configurations ($x_i$, $y_i$), $0 < x_i < y_i ≤ N$. We can verify that $S(10) = 211$ and $S({10}^4) = 230\\,312\\,207\\,313$. +Definiere $S(N)$ als die Summe von ($x_i + y_i$) für alle Verlustkombinationen ($x_i$, $y_i$), $0 < x_i < y_i ≤ N$. Wir können überprüfen, dass $S(10) = 211$ und $S({10}^4) = 230\\,312\\,207\\,313$. -Find $S({10}^{16})\bmod 7^{10}$. +Finde $S({10}^{16})\bmod 7^{10}$. # --hints-- -`stoneGameTwo()` should return `54672965`. +`stoneGameTwo()` sollte `54672965` zurückgeben. ```js assert.strictEqual(stoneGameTwo(), 54672965); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-326-modulo-summations.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-326-modulo-summations.md index e43a4a9f23c..bda93d1b95f 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-326-modulo-summations.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-326-modulo-summations.md @@ -1,6 +1,6 @@ --- id: 5900f4b21000cf542c50ffc5 -title: 'Problem 326: Modulo Summations' +title: 'Problem 326: Modulo-Summen' challengeType: 1 forumTopicId: 301983 dashedName: problem-326-modulo-summations @@ -8,23 +8,23 @@ dashedName: problem-326-modulo-summations # --description-- -Let $a_n$ be a sequence recursively defined by: $a_1 = 1$, $\displaystyle a_n = \left(\sum_{k = 1}^{n - 1} k \times a_k\right)\bmod n$. +Lasse $a_n$ eine Folge sein, die rekursiv definiert ist durch: $a_1 = 1$, $\displaystyle a_n = \left(\sum_{k = 1}^{n - 1} k \times a_k\right)\bmod n$. -So the first 10 elements of $a_n$ are: 1, 1, 0, 3, 0, 3, 5, 4, 1, 9. +Die ersten 10 Elemente von $a_n$ sind also: 1, 1, 0, 3, 0, 3, 5, 4, 1, 9. -Let $f(N, M)$ represent the number of pairs $(p, q)$ such that: +Lasse $f(N, M)$ die Anzahl der Paare $(p, q)$ sein, für die gilt: $$ 1 \le p \le q \le N \\; \text{and} \\; \left(\sum_{i = p}^q a_i\right)\bmod M = 0$$ -It can be seen that $f(10, 10) = 4$ with the pairs (3,3), (5,5), (7,9) and (9,10). +Es zeigt sich, dass $f(10, 10) = 4$ mit den Paaren (3,3), (5,5), (7,9) und (9,10). -You are also given that $f({10}^4, {10}^3) = 97\\,158$. +Außerdem ist gegeben, dass $f({10}^4, {10}^3) = 97\\,158$. -Find $f({10}^{12}, {10}^6)$. +Finde $f({10}^{12}, {10}^6)$. # --hints-- -`moduloSummations()` should return `1966666166408794400`. +`moduloSummations()` sollte `1966666166408794400` zurückgeben. ```js assert.strictEqual(moduloSummations(), 1966666166408794400); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-327-rooms-of-doom.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-327-rooms-of-doom.md index d324e96908a..cf350e27911 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-327-rooms-of-doom.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-327-rooms-of-doom.md @@ -1,6 +1,6 @@ --- id: 5900f4b31000cf542c50ffc6 -title: 'Problem 327: Rooms of Doom' +title: 'Problem 327: Räume des Verderbens' challengeType: 1 forumTopicId: 301984 dashedName: problem-327-rooms-of-doom @@ -8,35 +8,35 @@ dashedName: problem-327-rooms-of-doom # --description-- -A series of three rooms are connected to each other by automatic doors. +Eine Reihe von drei Räumen ist durch automatische Türen miteinander verbunden. -series of three rooms, connected to each other by automatic doors +eine Reihe von drei Räumen, die durch automatische Türen miteinander verbunden sind -Each door is operated by a security card. Once you enter a room, the door automatically closes, and that security card cannot be used again. A machine will dispense an unlimited number of cards at the start, but each room (including the starting room) contains scanners. If they detect that you are holding more than three security cards or if they detect an unattended security card on the floor, then all the doors will become permanently locked. However, each room contains a box where you may safely store any number of security cards for use at a later stage. +Jede Tür wird mit einer Sicherheitskarte bedient. Sobald Sie einen Raum betreten, schließt sich die Tür automatisch, und die Sicherheitskarte kann nicht mehr verwendet werden. Ein Automat gibt zu Beginn eine unbegrenzte Anzahl von Karten aus, aber jeder Raum (einschließlich des Startraums) enthält Scanner. Wenn sie feststellen, dass du mehr als drei Sicherheitskarten bei dir hast, oder wenn sie eine unbeaufsichtigte Sicherheitskarte auf dem Boden entdecken, werden alle Türen dauerhaft verschlossen. Jeder Raum enthält jedoch ein Fach, in dem du eine beliebige Anzahl von Sicherheitskarten sicher aufbewahren kannst, um sie zu einem späteren Zeitpunkt zu verwenden. -If you simply tried to travel through the rooms one at a time then as you entered room 3 you would have used all three cards and would be trapped in that room forever! +Wenn du einfach versucht hättest, die Räume nacheinander zu durchqueren, hättest du beim Betreten von Raum 3 alle drei Karten benutzt und wärst für immer in diesem Raum gefangen! -However, if you make use of the storage boxes, then escape is possible. For example, you could enter room 1 using your first card, place one card in the storage box, and use your third card to exit the room back to the start. Then after collecting three more cards from the dispensing machine you could use one to enter room 1 and collect the card you placed in the box a moment ago. You now have three cards again and will be able to travel through the remaining three doors. This method allows you to travel through all three rooms using six security cards in total. +Wenn du jedoch die Aufbewahrungsboxen benutzt, ist eine Flucht möglich. Du könntest zum Beispiel Raum 1 mit deiner ersten Karte betreten, eine Karte in die Aufbewahrungsbox legen und deine dritte Karte benutzen, um den Raum wieder zu verlassen. Nachdem du drei weitere Karten aus dem Automaten geholt hast, kannst du eine davon benutzen, um Raum 1 zu betreten und die Karte zu holen, die du soeben in den Kasten gelegt hast. Du hast nun wieder drei Karten und kannst durch die restlichen drei Türen reisen. Mit dieser Methode kannst du mit insgesamt sechs Sicherheitskarten durch alle drei Räume reisen. -It is possible to travel through six rooms using a total of 123 security cards while carrying a maximum of 3 cards. +Es ist möglich, sechs Räume mit insgesamt 123 Sicherheitskarten zu durchqueren, wobei maximal 3 Karten mitgeführt werden können. -Let $C$ be the maximum number of cards which can be carried at any time. +Lasse $C$ die maximale Anzahl von Karten sein, die zu jeder Zeit mitgeführt werden können. -Let $R$ be the number of rooms to travel through. +Lasse $R$ die Anzahl der zu durchlaufenden Räume sein. -Let $M(C, R)$ be the minimum number of cards required from the dispensing machine to travel through $R$ rooms carrying up to a maximum of $C$ cards at any time. +Lasse $M(C, R)$ die minimale Anzahl von Karten sein, die vom Automaten benötigt werden, um durch $R$ Räume zu gelangen, in denen sich zu jedem Zeitpunkt maximal $C$ Karten befinden. -For example, $M(3, 6) = 123$ and $M(4, 6) = 23$. +Zum Beispiel $M(3, 6) = 123$ und $M(4, 6) = 23$. -And, $\sum M(C, 6) = 146$ for $3 ≤ C ≤ 4$. +Und, $\sum M(C, 6) = 146$ für $3 ≤ C ≤ 4$. -You are given that $\sum M(C, 10) = 10382$ for $3 ≤ C ≤ 10$. +Dir wird angegeben, dass $\sum M(C, 10) = 10382$ für $3 ≤ C ≤ 10$. -Find $\sum M(C, 30)$ for $3 ≤ C ≤ 40$. +Finde $\sum M(C, 30)$ für $3 ≤ C ≤ 40$. # --hints-- -`roomsOfDoom()` should return `34315549139516`. +`roomsOfDoom()` sollte `34315549139516` zurückgeben. ```js assert.strictEqual(roomsOfDoom(), 34315549139516); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-328-lowest-cost-search.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-328-lowest-cost-search.md index 3d3d44147e3..8c2f6d25c81 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-328-lowest-cost-search.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-328-lowest-cost-search.md @@ -1,6 +1,6 @@ --- id: 5900f4b41000cf542c50ffc7 -title: 'Problem 328: Lowest-cost Search' +title: 'Problem 328: Suche nach den niedrigsten Kosten' challengeType: 1 forumTopicId: 301985 dashedName: problem-328-lowest-cost-search @@ -8,29 +8,29 @@ dashedName: problem-328-lowest-cost-search # --description-- -We are trying to find a hidden number selected from the set of integers {1, 2, ..., $n$} by asking questions. Each number (question) we ask, has a cost equal to the number asked and we get one of three possible answers: +Wir versuchen, eine versteckte Zahl aus der Menge der ganzen Zahlen {1, 2, ..., $n$} zu finden, indem wir Fragen stellen. Jede Zahl (Frage), die wir stellen, hat Kosten in Höhe der nachgefragten Zahl und wir erhalten eine von drei möglichen Antworten: -- "Your guess is lower than the hidden number", or -- "Yes, that's it!", or -- "Your guess is higher than the hidden number". +- "Deine Schätzung ist niedriger als die versteckte Zahl", oder +- "Ja, das ist es!", oder +- "Deine Schätzung ist höher als die versteckte Zahl". -Given the value of $n$, an optimal strategy minimizes the total cost (i.e. the sum of all the questions asked) for the worst possible case. E.g. +Angesichts des Wertes von $n$ minimiert eine optimale Strategie die Gesamtkosten (d.h. die Summe aller gestellten Fragen) für den schlimmstmöglichen Fall. Z.B. -If $n = 3$, the best we can do is obviously to ask the number "2". The answer will immediately lead us to find the hidden number (at a total cost = 2). +Wenn $n = 3$ ist, ist das Beste, was wir tun können, natürlich die Frage nach der Zahl "2". Die Antwort führt uns sofort zu der versteckten Zahl (mit Gesamtkosten = 2). -If $n = 8$, we might decide to use a "binary search" type of strategy: Our first question would be "4" and if the hidden number is higher than 4 we will need one or two additional questions. Let our second question be "6". If the hidden number is still higher than 6, we will need a third question in order to discriminate between 7 and 8. Thus, our third question will be "7" and the total cost for this worst-case scenario will be $4 + 6 + 7 = \mathbf{\color{red}{17}}$. +Wenn $n = 8$, könnten wir entscheiden, die "binäre Suche" als Strategiemethode zu verwenden: Unsere erste Frage würde lauten "4" und, wenn die versteckte Zahl höher ist als 4, benötigen wir eine oder zwei zusätzliche Fragen. Unsere zweite Frage lautet "6". Wenn die versteckte Zahl immer noch höher als 6 ist, brauchen wir eine dritte Frage, um zwischen 7 und 8 zu unterscheiden. Unsere dritte Frage lautet also "7", und die Gesamtkosten für dieses Worst-Case-Szenario betragen 4 $ + 6 + 7 = \mathbf{\color{red}{17}}$. -We can improve considerably the worst-case cost for $n = 8$, by asking "5" as our first question. If we are told that the hidden number is higher than 5, our second question will be "7", then we'll know for certain what the hidden number is (for a total cost of $5 + 7 = \mathbf{\color{blue}{12}}$). If we are told that the hidden number is lower than 5, our second question will be "3" and if the hidden number is lower than 3 our third question will be "1", giving a total cost of $5 + 3 + 1 = \mathbf{\color{blue}{9}}$. Since $\mathbf{\color{blue}{12 > 9}}$, the worst-case cost for this strategy is 12. That's better than what we achieved previously with the "binary search" strategy; it is also better than or equal to any other strategy. So, in fact, we have just described an optimal strategy for $n = 8$. +Wir können die Worst-Case-Kosten für $n = 8$ deutlich verbessern, indem wir "5" als erste Frage stellen. Wenn uns gesagt wird, dass die verborgene Zahl höher als 5 ist, lautet unsere zweite Frage "7", dann wissen wir mit Sicherheit, wie die verborgene Zahl lautet (bei Gesamtkosten von $5 + 7 = \mathbf{\color{blue}{12}}$). Wenn uns gesagt wird, dass die verborgene Zahl kleiner als 5 ist, lautet unsere zweite Frage "3", und wenn die verborgene Zahl kleiner als 3 ist, lautet unsere dritte Frage "1", was Gesamtkosten von 5 $ + 3 + 1 = {mathbf{\color{blue}{9}}$ ergibt. Da $\mathbf{\color{blue}{12 > 9}}$, sind die Worst-Case-Kosten für diese Strategie 12. Das ist besser als das, was wir zuvor mit der "binary search" Strategie erreicht haben; es ist also besser als oder gleichwertig mit jeder anderen Strategie. Also, haben wir tatsächlich nur eine optimale Strategie für $n = 8$ beschrieben. -Let $C(n)$ be the worst-case cost achieved by an optimal strategy for $n$, as described above. Thus $C(1) = 0$, $C(2) = 1$, $C(3) = 2$ and $C(8) = 12$. +Lasse $C(n)$ die schlimmsten Kosten sein, die durch eine optimale Strategie für $n$, wie oben beschrieben, erreicht werden. Somit ist $C(1) = 0$, $C(2) = 1$, $C(3) = 2$ und $C(8) = 12$. -Similarly, $C(100) = 400$ and $\displaystyle\sum_{n = 1}^{100} C(n) = 17575$. +Ebenso $C(100) = 400$ und $\displaystyle\sum_{n = 1}^{100} C(n) = 17575$. -Find $\displaystyle\sum_{n = 1}^{200\\,000} C(n)$. +Finde $\displaystyle\sum_{n = 1}^{200\\,000} C(n)$. # --hints-- -`lowestCostSearch()` should return `260511850222`. +`lowestCostSearch()` sollte `260511850222` zurückgeben. ```js assert.strictEqual(lowestCostSearch(), 260511850222); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-329-prime-frog.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-329-prime-frog.md index e14df07e58a..d9ee4033493 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-329-prime-frog.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-329-prime-frog.md @@ -1,6 +1,6 @@ --- id: 5900f4b51000cf542c50ffc8 -title: 'Problem 329: Prime Frog' +title: 'Problem 329: Primzahl-Frosch' challengeType: 1 forumTopicId: 301986 dashedName: problem-329-prime-frog @@ -8,27 +8,27 @@ dashedName: problem-329-prime-frog # --description-- -Susan has a prime frog. +Susan hat einen Primzahl-Frosch. -Her frog is jumping around over 500 squares numbered 1 to 500. +Dein Frosch springt über 500 Quadrate, die mit 1 bis 500 nummeriert sind. -He can only jump one square to the left or to the right, with equal probability, and he cannot jump outside the range [1;500]. (if it lands at either end, it automatically jumps to the only available square on the next move.) +Er kann nur ein Quadrat nach links oder rechts springen, mit gleicher Wahrscheinlichkeit, und er kann nicht außerhalb der Reichweite von [1;500] springen. (wenn er an einem der beiden Enden landet, springt er automatisch auf das einzige verfügbare Quadrat beim nächsten Schritt.) -When he is on a square with a prime number on it, he croaks 'P' (PRIME) with probability $\frac{2}{3}$ or 'N' (NOT PRIME) with probability $\frac{1}{3}$ just before jumping to the next square. When he is on a square with a number on it that is not a prime he croaks 'P' with probability $\frac{1}{3}$ or 'N' with probability $\frac{2}{3}$ just before jumping to the next square. +Wenn er auf einem Feld mit einer Primzahl steht, quakt er "P" (PRIMZAHL) mit der Wahrscheinlichkeit $\frac{2}{3}$ oder "N" (KEINE PRIMZAHL) mit der Wahrscheinlichkeit $\frac{1}{3}$, bevor er zum nächsten Feld springt. Wenn er auf einem Feld steht, auf dem eine Zahl steht, die keine Primzahl ist, quakt er "P" mit der Wahrscheinlichkeit $\frac{1}{3}$ oder "N" mit der Wahrscheinlichkeit $\frac{2}{3}$, bevor er zum nächsten Feld springt. -Given that the frog's starting position is random with the same probability for every square, and given that she listens to his first 15 croaks, what is the probability that she hears the sequence PPPPNNPPPNPPNPN? +Angesichts der Tatsache, dass die Startposition des Frosches mit gleicher Wahrscheinlichkeit für jedes Quadrat zufällig ist und hinsichtlich dessen, dass sie auf seine ersten 15 Quak-Geräusche achtet, was ist die Wahrscheinlichkeit, dass sie die Sequenz PPPPNNPPPNPPNPN hört? -Give your answer as a string as a fraction `p/q` in reduced form. +Gib deine Antwort in Form eines Strings als Bruch `p/q` in reduzierter Form an. # --hints-- -`primeFrog()` should return a string. +`primeFrog()` sollte einen String zurückgeben. ```js assert(typeof primeFrog() === 'string'); ``` -`primeFrog()` should return the string `199740353/29386561536000`. +`primeFrog()` sollte den String `199740353/29386561536000` zurückgeben. ```js assert.strictEqual(primeFrog(), '199740353/29386561536000'); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-330-eulers-number.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-330-eulers-number.md index 33079aadd49..051707e8834 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-330-eulers-number.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-330-eulers-number.md @@ -1,6 +1,6 @@ --- id: 5900f4b71000cf542c50ffc9 -title: 'Problem 330: Euler''s Number' +title: 'Problem 330: Eulersche Zahl' challengeType: 1 forumTopicId: 301988 dashedName: problem-330-eulers-number @@ -8,27 +8,27 @@ dashedName: problem-330-eulers-number # --description-- -An infinite sequence of real numbers $a(n)$ is defined for all integers $n$ as follows: +Eine unendliche Folge von reellen Zahlen $a(n)$ ist für alle Integer $n$ wie folgt definiert: $$ a(n) = \begin{cases} 1 & n < 0 \\\\ \displaystyle \sum_{i = 1}^{\infty} \frac{a(n - 1)}{i!} & n \ge 0 \end{cases} $$ -For example, +Zum Beispiel, $$\begin{align} & a(0) = \frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \ldots = e − 1 \\\\ & a(1) = \frac{e − 1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \ldots = 2e − 3 \\\\ & a(2) = \frac{2e − 3}{1!} + \frac{e − 1}{2!} + \frac{1}{3!} + \ldots = \frac{7}{2} e − 6 \end{align}$$ -with $e = 2.7182818\ldots$ being Euler's constant. +wobei $e = 2,7182818\ldots$ die Eulersche Konstante ist. -It can be shown that $a(n)$ is of the form $\displaystyle\frac{A(n)e + B(n)}{n!}$ for integers $A(n)$ and $B(n)$. +Es kann gezeigt werden, dass $a(n)$ die Form $\displaystyle\frac{A(n)e + B(n)}{n!}$ für ganze Zahlen $A(n)$ und $B(n)$ ist. -For example $\displaystyle a(10) = \frac{328161643e − 652694486}{10!}$. +Zum Beispiel $\displaystyle a(10) = \frac{328161643e - 652694486}{10!}$. -Find $A({10}^9)$ + $B({10}^9)$ and give your answer $\bmod 77\\,777\\,777$. +Finde $A({10}^9)$ + $B({10}^9)$ und gib deine Antwort $\bmod 77\\,777\,777$. # --hints-- -`eulersNumber()` should return `15955822`. +`eulersNumber()` sollte `15955822` zurückgeben. ```js assert.strictEqual(eulersNumber(), 15955822); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-331-cross-flips.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-331-cross-flips.md index 84e5ffbdd51..8850c363c81 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-331-cross-flips.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-331-cross-flips.md @@ -8,25 +8,25 @@ dashedName: problem-331-cross-flips # --description-- -N×N disks are placed on a square game board. Each disk has a black side and white side. +N×N Scheiben werden auf ein quadratisches Spielbrett gelegt. Jede Scheibe hat eine schwarze und eine weiße Seite. -At each turn, you may choose a disk and flip all the disks in the same row and the same column as this disk: thus $2 × N - 1$ disks are flipped. The game ends when all disks show their white side. The following example shows a game on a 5×5 board. +In jedem Zug darf man sich eine Scheibe aussuchen und alle Scheiben umdrehen, die sich in der gleichen Zeile und Spalte wie diese Scheibe befinden: Es werden also $2 × N - 1$ Scheiben umgedreht. Das Spiel endet, wenn von allen Scheiben die weisse Seite zu sehen ist. Das folgende Beispiel zeigt ein Spiel auf einem 5×5-Brett. -animation showing game on 5x5 board +Animation eines Spiels auf einem 5x5-Brett -It can be proven that 3 is the minimal number of turns to finish this game. +Es kann bewiesen werden, dass 3 die minimale Anzahl von Zügen ist, um dieses Spiel zu beenden. -The bottom left disk on the $N×N$ board has coordinates (0, 0); the bottom right disk has coordinates ($N - 1$,$0$) and the top left disk has coordinates ($0$,$N - 1$). +Die untere linke Scheibe auf dem $N×N$-Brett hat die Koordinaten (0, 0); die untere rechte Scheibe hat die Koordinaten ($N - 1$,$0$) und die obere linke Scheibe hat die Koordinaten ($0$,$N - 1$). -Let $C_N$ be the following configuration of a board with $N × N$ disks: A disk at ($x$, $y$) satisfying $N - 1 \le \sqrt{x^2 + y^2} \lt N$, shows its black side; otherwise, it shows its white side. $C_5$ is shown above. +Lasse $C_N$ die folgende Konfiguration eines Brettes mit $N × N$ Scheiben sein: Eine Scheibe bei ($x$, $y$), erfüllt die Bedingung $N - 1 \le \sqrt{x^2 + y^2} \lt N$, zeigt ihre schwarze Seite; andernfalls zeigt sie ihre weisse Seite. $C_5$ ist oben dargestellt. -Let $T(N)$ be the minimal number of turns to finish a game starting from configuration $C_N$ or 0 if configuration $C_N$ is unsolvable. We have shown that $T(5) = 3$. You are also given that $T(10) = 29$ and $T(1\\,000) = 395\\,253$. +Lasse $T(N)$ die minimale Anzahl von Zügen sein, um ein Spiel ausgehend von der Konfiguration $C_N$ zu beenden oder 0, wenn die Konfiguration $C_N$ unlösbar ist. Wir haben gezeigt, dass $T(5) = 3$. Dir wird ebenfalls angegeben, dass $T(10) = 29$ und $T(1\\,000) = 395\\,253$. -Find $\displaystyle \sum_{i = 3}^{31} T(2^i - i)$. +Finde $\displaystyle \sum_{i = 3}^{31} T(2^i - i)$. # --hints-- -`crossFlips()` should return `467178235146843500`. +`crossFlips()` sollte `467178235146843500` zurückgeben. ```js assert.strictEqual(crossFlips(), 467178235146843500); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-332-spherical-triangles.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-332-spherical-triangles.md index 54fe2d09a50..da65a88802b 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-332-spherical-triangles.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-332-spherical-triangles.md @@ -1,6 +1,6 @@ --- id: 5900f4b91000cf542c50ffcb -title: 'Problem 332: Spherical triangles' +title: 'Problem 332: Kugelförmige Dreiecke' challengeType: 1 forumTopicId: 301990 dashedName: problem-332-spherical-triangles @@ -8,25 +8,25 @@ dashedName: problem-332-spherical-triangles # --description-- -A spherical triangle is a figure formed on the surface of a sphere by three great circular arcs intersecting pairwise in three vertices. +Ein sphärisches Dreieck ist eine Figur, die auf der Oberfläche einer Kugel durch drei große kreisrunde Bögen gebildet wird, die sich paarweise in drei Scheitelpunkten schneiden. -spherical triangle formed on the surface of a sphere +sphärisches Dreieck, das auf der Oberfläche einer Kugel gebildet wird -Let $C(r)$ be the sphere with the centre (0,0,0) and radius $r$. +Lasse $C(r)$ die Kugel mit dem Mittelpunkt (0,0,0) und dem Radius $r$ sein. -Let $Z(r)$ be the set of points on the surface of $C(r)$ with integer coordinates. +Lasse $Z(r)$ die Menge der Punkte auf der Oberfläche von $C(r)$ mit ganzzahligen Koordinaten sein. -Let $T(r)$ be the set of spherical triangles with vertices in $Z(r)$. Degenerate spherical triangles, formed by three points on the same great arc, are not included in $T(r)$. +Lasse $T(r)$ die Menge der sphärischen Dreiecke mit Scheitelpunkten in $Z(r)$ sein. Entartete sphärische Dreiecke, die von drei Punkten auf demselben großen Bogen gebildet werden, sind nicht in $T(r)$ enthalten. -Let $A(r)$ be the area of the smallest spherical triangle in $T(r)$. +Lasse $A(r)$ die Fläche des kleinsten sphärischen Dreiecks in $T(r)$ sein. -For example $A(14)$ is 3.294040 rounded to six decimal places. +Zum Beispiel ist $A(14)$ 3,294040, gerundet auf sechs Dezimalstellen. -Find $\displaystyle \sum_{r = 1}^{50} A(r)$. Give your answer rounded to six decimal places. +Finde $\displaystyle \sum_{r = 1}^{50} A(r)$. Gebe deine Antwort auf sechs Dezimalstellen gerundet an. # --hints-- -`sphericalTriangles()` should return `2717.751525`. +`sphericalTriangles()` sollte `2717.751525` zurückgeben. ```js assert.strictEqual(sphericalTriangles(), 2717.751525); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-333-special-partitions.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-333-special-partitions.md index 27cad095741..e0bd68766bf 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-333-special-partitions.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-333-special-partitions.md @@ -1,6 +1,6 @@ --- id: 5900f4b91000cf542c50ffcc -title: 'Problem 333: Special partitions' +title: 'Problem 333: Spezielle Teilungen' challengeType: 1 forumTopicId: 301991 dashedName: problem-333-special-partitions @@ -8,26 +8,26 @@ dashedName: problem-333-special-partitions # --description-- -All positive integers can be partitioned in such a way that each and every term of the partition can be expressed as $2^i \times 3^j$, where $i, j ≥ 0$. +Alle positiven Integer können so geteilt werden, dass jeder einzelne Term der Aufteilung als $2^i \times 3^j$ ausgedrückt werden kann, wobei $i, j ≥ 0$. -Let's consider only those such partitions where none of the terms can divide any of the other terms. For example, the partition of $17 = 2 + 6 + 9 = (2^1 \times 3^0 + 2^1 \times 3^1 + 2^0 \times 3^2)$ would not be valid since 2 can divide 6. Neither would the partition $17 = 16 + 1 = (2^4 \times 3^0 + 2^0 \times 3^0)$ since 1 can divide 16. The only valid partition of 17 would be $8 + 9 = (2^3 \times 3^0 + 2^0 \times 3^2)$. +Betrachten wir nur solche Teilungen, bei denen keiner der Terme einen der anderen Terme teilen kann. Zum Beispiel wäre die Teilung von $17 = 2 + 6 + 9 = (2^1 \times 3^0 + 2^1 \times 3^1 + 2^0 \times 3^2)$ nicht gültig, da 2 durch 6 teilbar ist. Auch die Teilung $17 = 16 + 1 = (2^4 \times 3^0 + 2^0 \times 3^0)$ würde nicht funktionieren, da 1 die Zahl 16 teilen kann. Die einzig gültige Teilung von 17 wäre $8 + 9 = (2^3 \times 3^0 + 2^0 \times 3^2)$. -Many integers have more than one valid partition, the first being 11 having the following two partitions. +Viele ganze Zahlen haben mehr als eine gültige Unterteilung, die erste ist 11 und hat die folgenden zwei Unterteilungen. $$\begin{align} & 11 = 2 + 9 = (2^1 \times 3^0 + 2^0 \times 3^2) \\\\ & 11 = 8 + 3 = (2^3 \times 3^0 + 2^0 \times 3^1) \end{align}$$ -Let's define $P(n)$ as the number of valid partitions of $n$. For example, $P(11) = 2$. +Definieren wir $P(n)$ als die Anzahl der gültigen Partitionen von $n$. Zum Beispiel: $P(11) = 2$. -Let's consider only the prime integers $q$ which would have a single valid partition such as $P(17)$. +Betrachten wir nur die ganzen Primzahlen $q$, die eine einzige gültige Teilung wie $P(17)$ haben. -The sum of the primes $q <100$ such that $P(q) = 1$ equals 233. +Die Summe der Primzahlen $q <100$, so dass $P(q) = 1$ gleich 233 ist. -Find the sum of the primes $q < 1\\,000\\,000$ such that $P(q) = 1$. +Finde die Summe der Primzahlen $q < 1\\,000\\,000$, sodass $P(q) = 1$ ist. # --hints-- -`specialPartitions()` should return `3053105`. +`specialPartitions()` sollte `3053105` zurückgeben. ```js assert.strictEqual(specialPartitions(), 3053105); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-472-comfortable-distance-ii.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-472-comfortable-distance-ii.md index 25c9c601cf6..09e48f98ede 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-472-comfortable-distance-ii.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-472-comfortable-distance-ii.md @@ -1,6 +1,6 @@ --- id: 5900f5451000cf542c510057 -title: 'Problem 472: Comfortable Distance II' +title: 'Problem 472: Angenehmer Abstand II' challengeType: 1 forumTopicId: 302149 dashedName: problem-472-comfortable-distance-ii @@ -8,29 +8,29 @@ dashedName: problem-472-comfortable-distance-ii # --description-- -There are $N$ seats in a row. $N$ people come one after another to fill the seats according to the following rules: +Es gibt $N$ Sitze in einer Reihe. $N$ Personen kommen nacheinander, um die Plätze nach den folgenden Regeln zu besetzen: -1. No person sits beside another. -1. The first person chooses any seat. -1. Each subsequent person chooses the seat furthest from anyone else already seated, as long as it does not violate rule 1. If there is more than one choice satisfying this condition, then the person chooses the leftmost choice. +1. Keine Person sitzt neben einer anderen. +1. Die erste Person wählt einen beliebigen Platz. +1. Jede weitere Person wählt den Sitz, der am weitesten von den bereits sitzenden Personen entfernt ist, sofern dies nicht gegen Regel 1 verstößt. Gibt es mehr als eine Wahlmöglichkeit, die diese Bedingung erfüllt, wählt die Person die Wahlmöglichkeit ganz links. -Note that due to rule 1, some seats will surely be left unoccupied, and the maximum number of people that can be seated is less than $N$ (for $N > 1$). +Beachte, dass aufgrund von Regel 1 sicherlich einige Plätze unbesetzt bleiben werden und die maximale Anzahl von Personen, die sitzen können, kleiner ist als $N$ (für $N > 1$). -Here are the possible seating arrangements for $N = 15$: +Hier sind die möglichen Sitzordnungen für $N = 15$: -seating arrangements for N = 15 +Sitzordnung für N = 15 -We see that if the first person chooses correctly, the 15 seats can seat up to 7 people. We can also see that the first person has 9 choices to maximize the number of people that may be seated. +Wir sehen, dass, wenn die erste Person richtig wählt, die 15 Plätze bis zu 7 Personen aufnehmen können. Wir können auch sehen, dass die erste Person 9 Auswahlmöglichkeiten hat, um die Anzahl der Personen zu maximieren, die Platz nehmen können. -Let $f(N)$ be the number of choices the first person has to maximize the number of occupants for $N$ seats in a row. Thus, $f(1) = 1$, $f(15) = 9$, $f(20) = 6$, and $f(500) = 16$. +Lasse $f(N)$ die Anzahl der Wahlmöglichkeiten sein, die die erste Person hat, um die Anzahl der Plätze für $N$ Sitze in einer Reihe zu maximieren. Somit ist $f(1) = 1$, $f(15) = 9$, $f(20) = 6$ und $f(500) = 16$. -Also, $\sum f(N) = 83$ for $1 ≤ N ≤ 20$ and $\sum f(N) = 13\\,343$ for $1 ≤ N ≤ 500$. +Außerdem ist $\sum f(N) = 83$ für $1 ≤ N ≤ 20$ und $\sum f(N) = 13\\,343$ für $1 ≤ N ≤ 500$. -Find $\sum f(N)$ for $1 ≤ N ≤ {10}^{12}$. Give the last 8 digits of your answer. +Finde $\sum f(N)$ für $1 ≤ N ≤ {10}^{12}$. Gib die letzten 8 Ziffern deiner Antwort an. # --hints-- -`comfortableDistanceTwo()` should return `73811586`. +`comfortableDistanceTwo()` sollte `73811586` zurückgeben. ```js assert.strictEqual(comfortableDistanceTwo(), 73811586); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-473-phigital-number-base.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-473-phigital-number-base.md index 97a545fed4c..f120f2164d8 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-473-phigital-number-base.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-473-phigital-number-base.md @@ -1,6 +1,6 @@ --- id: 5900f5461000cf542c510058 -title: 'Problem 473: Phigital number base' +title: 'Problem 473: Phigitale Zahlenbasis' challengeType: 1 forumTopicId: 302150 dashedName: problem-473-phigital-number-base @@ -8,29 +8,29 @@ dashedName: problem-473-phigital-number-base # --description-- -Let $\varphi$ be the golden ratio: $\varphi = \frac{1+\sqrt{5}}{2}.$ +Lasse $\varphi$ den Goldenen Schnitt sein: $\varphi = \frac{1+\sqrt{5}}{2}.$ -Remarkably it is possible to write every positive integer as a sum of powers of $\varphi$ even if we require that every power of $\varphi$ is used at most once in this sum. +Bemerkenswerterweise ist es möglich, jeden positiven Integer als eine Summe von Potenzen von $\varphi$ zu schreiben, selbst wenn wir verlangen, dass jede Potenz von $\varphi$ höchstens einmal in dieser Summe vorkommt. -Even then this representation is not unique. +Selbst dann ist diese Darstellung nicht eindeutig. -We can make it unique by requiring that no powers with consecutive exponents are used and that the representation is finite. +Wir können sie eindeutig machen, indem wir verlangen, dass keine Potenzen mit aufeinanderfolgenden Exponenten verwendet werden und dass die Darstellung endlich ist. -E.g: +Z.B: -$2 = \varphi + \varphi^{-2}$ and $3 = \varphi^{2} + \varphi^{-2}$ +$2 = \varphi + \varphi^{-2}$ und $3 = \varphi^{2} + \varphi^{-2}$ -To represent this sum of powers of $\varphi$ we use a string of 0's and 1's with a point to indicate where the negative exponents start. We call this the representation in the phigital numberbase. +Um diese Summe von Potenzen von $\varphi$ darzustellen, verwenden wir eine Reihe von 0en und 1en mit einem Punkt, der angibt, wo die negativen Exponenten beginnen. Wir nennen dies die Darstellung in der phigitalen Zahlenbasis. -So $1 = 1_{\varphi}$, $2 = 10.01_{\varphi}$, $3 = 100.01_{\varphi}$ and $14 = 100100.001001_{\varphi}$. The strings representing 1, 2 and 14 in the phigital number base are palindromic, while the string representing 3 is not (the phigital point is not the middle character). +So $1 = 1_{\varphi}$, $2 = 10.01_{\varphi}$, $3 = 100.01_{\varphi}$ und $14 = 100100.001001_{\varphi}$. Die Strings, die 1, 2 und 14 in der phigitalen Zahlenbasis darstellen, sind palindromisch, während der String, der 3 darstellt, nicht palindromisch ist (der phigitale Punkt ist nicht das mittlere Zeichen). -The sum of the positive integers not exceeding 1000 whose phigital representation is palindromic is 4345. +Die Summe der positiven ganzen Zahlen, die 1000 nicht überschreiten und deren Zifferndarstellung palindromisch ist, ist 4345. -Find the sum of the positive integers not exceeding $10^{10}$ whose phigital representation is palindromic. +Finde die Summe der positiven ganzen Zahlen, die nicht größer als $10^{10}$ sind und deren phigitale Darstellung palindromisch ist. # --hints-- -`phigitalNumberBase()` should return `35856681704365`. +`phigitalNumberBase()` sollte `35856681704365` zurückgeben. ```js assert.strictEqual(phigitalNumberBase(), 35856681704365); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-474-last-digits-of-divisors.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-474-last-digits-of-divisors.md index e63a971d336..c67363117b8 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-474-last-digits-of-divisors.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-474-last-digits-of-divisors.md @@ -1,6 +1,6 @@ --- id: 5900f5471000cf542c510059 -title: 'Problem 474: Last digits of divisors' +title: 'Problem 474: Letzte Ziffern von Divisoren' challengeType: 1 forumTopicId: 302151 dashedName: problem-474-last-digits-of-divisors @@ -8,17 +8,17 @@ dashedName: problem-474-last-digits-of-divisors # --description-- -For a positive integer $n$ and digits $d$, we define $F(n, d)$ as the number of the divisors of $n$ whose last digits equal $d$. +Für einen positiven Integer $n$ und Ziffern $d$ definieren wir $F(n, d)$ als die Anzahl der Teiler von $n$, deren letzte Ziffern gleich $d$ sind. -For example, $F(84, 4) = 3$. Among the divisors of 84 (1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84), three of them (4, 14, 84) have the last digit 4. +Zum Beispiel, $F(84, 4) = 3$. Unter den Teilern von 84 (1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84) haben drei von ihnen (4, 14, 84) die letzte Ziffer 4. -We can also verify that $F(12!, 12) = 11$ and $F(50!, 123) = 17\\,888$. +Wir können auch überprüfen, dass $F(12!, 12) = 11$ und $F(50!, 123) = 17\\,888$. -Find $F({10}^6!, 65\\,432) \text{ modulo } ({10}^{16} + 61)$. +Finde $F({10}^6!, 65\\,432) \text{ modulo } ({10}^{16} + 61)$. # --hints-- -`lastDigitsOfDivisors()` should return `9690646731515010`. +`lastDigitsOfDivisors()` sollte `9690646731515010` zurückgeben. ```js assert.strictEqual(lastDigitsOfDivisors(), 9690646731515010); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-475-music-festival.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-475-music-festival.md index 9f019e969d0..a22b88b5b45 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-475-music-festival.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-475-music-festival.md @@ -1,6 +1,6 @@ --- id: 5900f5481000cf542c51005a -title: 'Problem 475: Music festival' +title: 'Problem 475: Musikfestival' challengeType: 1 forumTopicId: 302152 dashedName: problem-475-music-festival @@ -8,21 +8,21 @@ dashedName: problem-475-music-festival # --description-- -$12n$ musicians participate at a music festival. On the first day, they form $3n$ quartets and practice all day. +$12n$ Musiker nehmen an einem Musikfestival teil. Am ersten Tag bilden sie $3n$-Quartette und üben den ganzen Tag. -It is a disaster. At the end of the day, all musicians decide they will never again agree to play with any member of their quartet. +Es ist eine Katastrophe. Am Ende des Tages beschließen alle Musiker, dass sie nie wieder mit einem Mitglied ihres Quartetts spielen wollen. -On the second day, they form $4n$ trios, each musician avoiding his previous quartet partners. +Am zweiten Tag bilden sie $4n$-Trios, wobei jeder Musiker seine bisherigen Quartettpartner meidet. -Let $f(12n)$ be the number of ways to organize the trios amongst the $12n$ musicians. +Lasse $f(12n)$ die Anzahl der Möglichkeiten sein, die Trios unter den $12n$ Musikern zu organisieren. -You are given $f(12) = 576$ and $f(24)\bmod 1\\,000\\,000\\,007 = 509\\,089\\,824$. +Du erhältst $f(12) = 576$ und $f(24)\bmod 1\\.000\\.000\.007 = 509\\.089\\.824$. -Find $f(600)\bmod 1\\,000\\,000\\,007$. +Finde $f(600)\bmod 1\\,000\\,000\\,007$. # --hints-- -`musicFestival()` should return `75780067`. +`musicFestival()` sollte `75780067` zurückgeben. ```js assert.strictEqual(musicFestival(), 75780067); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-476-circle-packing-ii.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-476-circle-packing-ii.md index c6f88e38013..fa0ed3c7f3e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-476-circle-packing-ii.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-476-circle-packing-ii.md @@ -1,6 +1,6 @@ --- id: 5900f5481000cf542c51005b -title: 'Problem 476: Circle Packing II' +title: 'Problem 476: Kreisförmige Verpackung II' challengeType: 1 forumTopicId: 302153 dashedName: problem-476-circle-packing-ii @@ -8,17 +8,17 @@ dashedName: problem-476-circle-packing-ii # --description-- -Let $R(a, b, c)$ be the maximum area covered by three non-overlapping circles inside a triangle with edge lengths $a$, $b$ and $c$. +Lasse $R(a, b, c)$ die maximale Fläche sein, die von drei sich nicht überschneidenden Kreisen innerhalb eines Dreiecks mit den Kantenlängen $a$, $b$ und $c$ bedeckt wird. -Let $S(n)$ be the average value of $R(a, b, c)$ over all integer triplets $(a, b, c)$ such that $1 ≤ a ≤ b ≤ c < a + b ≤ n$. +Lasse $S(n)$ der Mittelwert von $R(a, b, c)$ über alle ganzzahligen Tripel $(a, b, c)$ sein, für die gilt: $1 ≤ a ≤ b ≤ c < a + b ≤ n$. -You are given $S(2) = R(1, 1, 1) ≈ 0.31998$, $S(5) ≈ 1.25899$. +Du erhältst $S(2) = R(1, 1, 1) ≈ 0,31998$, $S(5) ≈ 1,25899$. -Find $S(1803)$ rounded to 5 decimal places behind the decimal point. +Finde $S(1803)$ gerundet auf 5 Nachkommastellen. # --hints-- -`circlePackingTwo()` should return `110242.87794`. +`circlePackingTwo()` sollte `110242.87794` zurückgeben. ```js assert.strictEqual(circlePackingTwo(), 110242.87794); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-477-number-sequence-game.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-477-number-sequence-game.md index 18bcc8e538b..f09e16ecc97 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-477-number-sequence-game.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-477-number-sequence-game.md @@ -1,6 +1,6 @@ --- id: 5900f54a1000cf542c51005c -title: 'Problem 477: Number Sequence Game' +title: 'Problem 477: Zahlenreihenfolge-Spiel' challengeType: 1 forumTopicId: 302154 dashedName: problem-477-number-sequence-game @@ -8,35 +8,35 @@ dashedName: problem-477-number-sequence-game # --description-- -The number sequence game starts with a sequence $S$ of $N$ numbers written on a line. +Das Zahlenfolgespiel beginnt mit einer Folge $S$ von $N$ Zahlen, die in eine Zeile geschrieben werden. -Two players alternate turns. At his turn, a player must select and remove either the first or the last number remaining in the sequence. +Zwei Spieler wechseln sich ab. Wenn ein Spieler an der Reihe ist, muss er entweder die erste oder die letzte verbleibende Zahl in der Reihe auswählen und entfernen. -The player score is the sum of all the numbers he has taken. Each player attempts to maximize his own sum. +Die Punktzahl des Spielers ergibt sich aus der Summe aller Zahlen, die er gezogen hat. Jeder Spieler versucht, seine eigene Summe zu maximieren. -If $N = 4$ and $S = \\{1, 2, 10, 3\\}$, then each player maximizes his score as follows: +Wenn $N = 4$ und $S = \\{1, 2, 10, 3\\}$, dann maximiert jeder Spieler seine Punktzahl wie folgt: -- Player 1: removes the first number (1) -- Player 2: removes the last number from the remaining sequence (3) -- Player 1: removes the last number from the remaining sequence (10) -- Player 2: removes the remaining number (2) +- Spieler 1: entfernt die erste Zahl (1) +- Spieler 2: entfernt die letzte Zahl aus der verbleibenden Sequenz (3) +- Spieler 1: entfernt die letzte Zahl aus der verbleibenden Sequenz (10) +- Spieler 2: entfernt die verbleibende Zahl (2) -Player 1 score is $1 + 10 = 11$. +Die Punktzahl von Spieler 1 beträgt $1 + 10 = 11$. -Let $F(N)$ be the score of player 1 if both players follow the optimal strategy for the sequence $S = \\{s_1, s_2, \ldots, s_N\\}$ defined as: +$F(N)$ ist die Punktzahl von Spieler 1, wenn beide Spieler die optimale Strategie für die Folge $S = \\{s_1, s_2, \ldots, s_N\\}$ verfolgen und ist somit definiert als: - $s_1 = 0$ - $s_{i + 1} = ({s_i}^2 + 45)$ modulo $1\\,000\\,000\\,007$ -The sequence begins with $S = \\{0, 45, 2\\,070, 4\\,284\\,945, 753\\,524\\,550, 478\\,107\\,844, 894\\,218\\,625, \ldots\\}$. +Die Folge beginnt mit $S = \\{0, 45, 2\\,070, 4\\,284\\,945, 753\,524\\,550, 478\,107\\,844, 894\,218\\,625, \ldots\\\}$. -You are given $F(2) = 45$, $F(4) = 4\\,284\\,990$, $F(100) = 26\\,365\\,463\\,243$, $F(104) = 2\\,495\\,838\\,522\\,951$. +Folgendes ist gegeben: $F(2) = 45$, $F(4) = 4\\,284\\,990$, $F(100) = 26\\,365\\,463\\,243$, $F(104) = 2\\,495\\,838\\,522\\,951$. -Find $F({10}^8)$. +Finde $F({10}^8)$. # --hints-- -`numberSequenceGame()` should return `25044905874565164`. +`numberSequenceGame()` sollte `25044905874565164` zurückgeben. ```js assert.strictEqual(numberSequenceGame(), 25044905874565164); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-478-mixtures.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-478-mixtures.md index d2f0dbd2054..1054c783db3 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-478-mixtures.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-478-mixtures.md @@ -1,6 +1,6 @@ --- id: 5900f54c1000cf542c51005e -title: 'Problem 478: Mixtures' +title: 'Problem 478: Mischungen' challengeType: 1 forumTopicId: 302155 dashedName: problem-478-mixtures @@ -8,29 +8,29 @@ dashedName: problem-478-mixtures # --description-- -Let us consider mixtures of three substances: $A$, $B$ and $C$. A mixture can be described by a ratio of the amounts of $A$, $B$, and $C$ in it, i.e., $(a : b : c)$. For example, a mixture described by the ratio (2 : 3 : 5) contains 20% $A$, 30% $B$ and 50% $C$. +Wir betrachten Gemische aus drei Stoffen: $A$, $B$ und $C$. Ein Gemisch kann durch ein Verhältnis der Mengen von $A$, $B$ und $C$ zusammengesetzt werden, d. h. $(a : b : c)$. Ein Gemisch, das durch das Verhältnis (2 : 3 : 5) beschrieben wird, enthält beispielsweise 20% $A$, 30% $B$ und 50% $C$. -For the purposes of this problem, we cannot separate the individual components from a mixture. However, we can combine different amounts of different mixtures to form mixtures with new ratios. +Für diesen Zweck können wir die einzelnen Bestandteile eines Gemischs nicht trennen. Wir können jedoch unterschiedliche Mengen verschiedener Gemische kombinieren, um Gemische mit neuen Verhältnissen zu bilden. -For example, say we have three mixtures with ratios (3 : 0 : 2), (3 : 6 : 11) and (3 : 3 : 4). By mixing 10 units of the first, 20 units of the second and 30 units of the third, we get a new mixture with ratio (6 : 5 : 9), since: ($10 \times \frac{3}{5} + 20 \times \frac{3}{20} + 30 \times \frac{3}{10}$ : $10 \times \frac{0}{5} + 20 \times \frac{6}{20} + 30 \times \frac{3}{10}$ : $10 \times \frac{2}{5} + 20 \times \frac{11}{20} + 30 \times \frac{4}{10}$) = (18 : 15 : 27) = (6 : 5 : 9) +Nehmen wir zum Beispiel an, wir haben drei Gemische mit den Verhältnissen (3 : 0 : 2), (3 : 6 : 11) und (3 : 3 : 4). Wenn man 10 Einheiten des ersten, 20 Einheiten des zweiten und 30 Einheiten des dritten Stoffes mischt, erhält man eine neue Mischung im Verhältnis (6 : 5 : 9), denn: ($10 \times \frac{3}{5} + 20 \times \frac{3}{20} + 30 \times \frac{3}{10}$ : $10 \times \frac{0}{5} + 20 \times \frac{6}{20} + 30 \times \frac{3}{10}$ : $10 \times \frac{2}{5} + 20 \times \frac{11}{20} + 30 \times \frac{4}{10}$) = (18 : 15 : 27) = (6 : 5 : 9) -However, with the same three mixtures, it is impossible to form the ratio (3 : 2 : 1), since the amount of $B$ is always less than the amount of $C$. +Mit denselben drei Gemischen ist es jedoch unmöglich, das Verhältnis (3 : 2 : 1) zu bilden, da die Menge von $B$ immer kleiner ist als die Menge von $C$. -Let $n$ be a positive integer. Suppose that for every triple of integers $(a, b, c)$ with $0 ≤ a, b, c ≤ n$ and $gcd(a, b, c) = 1$, we have a mixture with ratio $(a : b : c)$. Let $M(n)$ be the set of all such mixtures. +Lasse $n$ eine positive ganze Zahl sein. Angenommen, für jedes Tripel der Integer $(a, b, c)$ mit $0 ≤ a, b, c ≤ n$ und $gcd(a, b, c) = 1$ gibt es eine Mischung mit dem Verhältnis $(a : b : c)$. Lasse $M(n)$ die Menge aller solcher Mischungen sein. -For example, $M(2)$ contains the 19 mixtures with the following ratios: +Zum Beispiel enthält $M(2)$ die 19 Gemische mit den folgenden Verhältnissen: {(0 : 0 : 1), (0 : 1 : 0), (0 : 1 : 1), (0 : 1 : 2), (0 : 2 : 1), (1 : 0 : 0), (1 : 0 : 1), (1 : 0 : 2), (1 : 1 : 0), (1 : 1 : 1), (1 : 1 : 2), (1 : 2 : 0), (1 : 2 : 1), (1 : 2 : 2), (2 : 0 : 1), (2 : 1 : 0), (2 : 1 : 1), (2 : 1 : 2), (2 : 2 : 1)}. -Let $E(n)$ be the number of subsets of $M(n)$ which can produce the mixture with ratio (1 : 1 : 1), i.e., the mixture with equal parts $A$, $B$ and $C$. +Lasse $E(n)$ die Anzahl der Teilmengen von $M(n)$ sein, die das Gemisch mit dem Verhältnis (1 : 1 : 1), d.h. das Gemisch mit gleichen Anteilen $A$, $B$ und $C$, ergeben können. -We can verify that $E(1) = 103$, $E(2) = 520\\,447$, $E(10)\bmod {11}^8 = 82\\,608\\,406$ and $E(500)\bmod {11}^8 = 13\\,801\\,403$. +Wir können überprüfen, dass $E(1) = 103$, $E(2) = 520\\,447$, $E(10)\bmod {11}^8 = 82\\,608\\,406$ und $E(500)\bmod {11}^8 = 13\\,801\\,403$. -Find $E(10\\,000\\,000)\bmod {11}^8$. +Finde $E(10\\,000\\,000)\bmod {11}^8$. # --hints-- -`mixtures()` should return `59510340`. +`mixtures()` sollte `59510340` zurückgeben. ```js assert.strictEqual(mixtures(), 59510340); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.md index b905a648468..df4ff3e8a80 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.md @@ -8,19 +8,19 @@ dashedName: problem-479-roots-on-the-rise # --description-- -Let $a_k$, $b_k$, and $c_k$ represent the three solutions (real or complex numbers) to the expression $\frac{1}{x} = {\left(\frac{k}{x} \right)}^2 (k + x^2) - kx$. +Lasse $a_k$, $b_k$ und $c_k$ die drei Lösungen (reelle oder komplexe Zahlen) des Ausdrucks $\frac{1}{x} = {\left(\frac{k}{x} \right)}^2 (k + x^2) - kx$ sein. -For instance, for $k = 5$, we see that $\\{a_5, b_5, c_5\\}$ is approximately $\\{5.727244, -0.363622 + 2.057397i, -0.363622 - 2.057397i\\}$. +Für $k = 5$ sehen wir zum Beispiel, dass $\\{a_5, b_5, c_5\\}$ ungefähr $\\{5.727244, -0.363622 + 2.057397i, -0.363622 - 2.057397i\\\}$ ist. -Let $S(n) = \displaystyle\sum_{p = 1}^n \sum_{k = 1}^n {(a_k + b_k)}^p {(b_k + c_k)}^p {(c_k + a_k)}^p$ for all integers $p$, $k$ such that $1 ≤ p, k ≤ n$. +Lasse t $S(n) = \displaystyle\sum_{p = 1}^n \sum_{k = 1}^n {(a_k + b_k)}^p {(b_k + c_k)}^p {(c_k + a_k)}^p$ für alle Integer $p$, $k$ sein, so dass $1 ≤ p, k ≤ n$ ist. -Interestingly, $S(n)$ is always an integer. For example, $S(4) = 51\\,160$. +Interessanterweise ist $S(n)$ immer ein Integer. Zum Beispiel $S(4) = 51\\,160$. -Find $S({10}^6) \text{ modulo } 1\\,000\\,000\\,007$. +Finde $S({10}^6) \text{ modulo } 1\\,000\\,000\\,007$. # --hints-- -`rootsOnTheRise()` should return `191541795`. +`rootsOnTheRise()` sollte `191541795` zurückgeben. ```js assert.strictEqual(rootsOnTheRise(), 191541795); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-480-the-last-question.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-480-the-last-question.md index b07b59bb692..3f5f5a23a21 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-480-the-last-question.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-480-the-last-question.md @@ -1,6 +1,6 @@ --- id: 5900f54c1000cf542c51005f -title: 'Problem 480: The Last Question' +title: 'Problem 480: Die letzte Frage' challengeType: 1 forumTopicId: 302158 dashedName: problem-480-the-last-question @@ -8,13 +8,13 @@ dashedName: problem-480-the-last-question # --description-- -Consider all the words which can be formed by selecting letters, in any order, from the phrase: +Überlege dir alle Wörter, die durch die Auswahl von Buchstaben, in beliebiger Reihenfolge, aus dem Satz gebildet werden können: $$\mathbf{\text{thereisasyetinsufficientdataforameaningfulanswer}}$$ -Suppose those with 15 letters or less are listed in alphabetical order and numbered sequentially starting at 1. +Nehmen wir an, dass diejenigen, die 15 Buchstaben oder weniger haben, in alphabetischer Reihenfolge aufgelistet und von 1 an fortlaufend nummeriert sind. -The list would include: +Die Liste würde Folgendes umfassen: $$\begin{align} & 1: \text{a} \\\\ & 2: \text{aa} \\\\ & 3: \text{aaa} \\\\ @@ -32,31 +32,31 @@ $$\begin{align} & 1: \text{a} \\\\ & ... \\\\ & 525069350231428029: \text{ywuuttttssssrrr} \\\\ \end{align}$$ -Define $P(w)$ as the position of the word $w$. +Definiere $P(w)$ als die Position des Wortes $w$. -Define $W(p)$ as the word in position $p$. +Definiere $W(p)$ als das Wort an der Position $p$. -We can see that $P(w)$ and $W(p)$ are inverses: $P(W(p)) = p$ and $W(P(w)) = w$. +Wir können sehen, dass $P(w)$ und $W(p)$ invers sind: $P(W(p)) = p$ und $W(P(w)) = w$. -Examples: +Beispiele: $$\begin{align} & W(10) = \text{ aaaaaacdee} \\\\ & P(\text{aaaaaacdee}) = 10 \\\\ & W(115246685191495243) = \text{ euler} \\\\ & P(\text{euler}) = 115246685191495243 \\\\ \end{align}$$ -Find $$W(P(\text{legionary}) + P(\text{calorimeters}) - P(\text{annihilate}) + P(\text{orchestrated}) - P(\text{fluttering})).$$ +Finde $$W(P(\text{legionary}) + P(\text{calorimeters}) - P(\text{annihilate}) + P(\text{orchestrated}) - P(\text{fluttering})).$$ -Give your answer using lowercase characters (no punctuation or space). +Gib deine Antwort in Kleinbuchstaben (ohne Satzzeichen oder Leerzeichen). # --hints-- -`euler480()` should return a string. +`euler480()` sollte einen String zurückgeben. ```js assert(typeof euler480() === 'string'); ``` -`euler480()` should return the string `turnthestarson`. +`euler480()` sollte die Zeichenfolge `turnthestarson` zurückgeben. ```js assert.strictEqual(euler480(), 'turnthestarson'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md index 01c1ffad195..d1dbdc72385 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md @@ -7,7 +7,7 @@ dashedName: step-3 # --description-- -Continuing with the `meta` elements, a `viewport` definition tells the browser how to render the page. Indem du eine solche hinzufügst, verbesserst du die visuelle Barrierefreiheit deiner Seite auf mobilen Endgeräten und dein _SEO_ (Search Engine Optimization – Suchmaschinenoptimierung). +Um mit den `meta`-Elementen fortzufahren: Durch eine `viewport`-Definition wird dem Browser mitgeteilt, wie er die Seite darzustellen hat. Indem du eine solche hinzufügst, verbesserst du die visuelle Barrierefreiheit deiner Seite auf mobilen Endgeräten und dein _SEO_ (Search Engine Optimization – Suchmaschinenoptimierung). Füge eine `viewport`-Definition mit einem `content`-Attribut hinzu, das die `width` und den `initial-scale` der Seite beschreibt. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143610161323a081b249c19.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143610161323a081b249c19.md index 8da85cd6c49..67c69149609 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143610161323a081b249c19.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143610161323a081b249c19.md @@ -13,7 +13,7 @@ Then, within each `div` nest one `label` element, and one `input` element. # --hints-- -You should nest three `div` elements below the `h2#student-info` element. +Du solltest drei `div`-Elemente unterhalb des `h2#student-info`-Elements verschachteln. ```js assert.equal(document.querySelectorAll('h2#student-info ~ div')?.length, 3); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e8b5080a5f06bb0223d0.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e8b5080a5f06bb0223d0.md index 0109d60dd76..aa100f9f4a8 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e8b5080a5f06bb0223d0.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e8b5080a5f06bb0223d0.md @@ -7,7 +7,7 @@ dashedName: step-32 # --description-- -Give the `label` elements text such that the `input` comes before the text. Then, give the `input` elements a `value` matching the text. +Gib den `label`-Elementen Text, und zwar so, dass der `input` vor dem Text steht. Weise den `input`-Elementen anschließend eine, dem Text entsprechende, `value` zu. Der Text sollte entweder `True` oder `False` sein. @@ -61,47 +61,47 @@ You should place the fourth `label` text content after the `input` element. assert.match(document.querySelectorAll('ul.answers-list > li > label')?.[3]?.innerHTML, />[\s\S]+[a-zA-Z]/); ``` -You should give the first `label` the text `True` or `False`. +Du solltest dem ersten `label` den Text `True` oder `False` geben. ```js assert.include(['True', 'False'], document.querySelectorAll('ul.answers-list > li > label')?.[0]?.textContent?.trim()); ``` -You should give the second `label` the text `True`. +Du solltest dem zweiten `label` den Text `True` geben. ```js const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim(); assert(l(0) === 'False' ? l(1) === 'True' : true); ``` -You should give the second `label` the text `False`. +Du solltest dem zweiten `label` den Text `False` geben. ```js const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim(); assert(l(0) === 'True' ? l(1) === 'False' : true); ``` -You should give the third `label` the text `True` or `False`. +Du solltest dem dritten `label` den Text `True` oder `False` geben. ```js assert.include(['True', 'False'], document.querySelectorAll('ul.answers-list > li > label')?.[2]?.textContent?.trim()); ``` -You should give the fourth `label` the text `True`. +Du solltest dem vierten `label` den Text `True` geben. ```js const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim(); assert(l(2) === 'False' ? l(3) === 'True' : true); ``` -You should give the fourth `label` the text `False`. +Du solltest dem vierten `label` den Text `False` geben. ```js const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim(); assert(l(2) === 'True' ? l(3) === 'False' : true); ``` -You should give the first `input` a `value` matching the `label` text content. +Du solltest dem ersten `input` ein `value` entsprechend dem `label` Textinhalt geben. ```js assert.equal(document.querySelectorAll('ul.answers-list > li > label')?.[0]?.textContent?.trim()?.toLowerCase(), document.querySelectorAll('ul.answers-list > li > label > input')?.[0]?.value?.toLowerCase()); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ee65e2e1530938cb594d.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ee65e2e1530938cb594d.md index c70ce498d49..322be067e90 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ee65e2e1530938cb594d.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ee65e2e1530938cb594d.md @@ -7,7 +7,7 @@ dashedName: step-35 # --description-- -The final section of this quiz will contain a dropdown, and a text box. +Der letzte Abschnitt dieses Quiz enthält eine Dropdown-Liste und ein Textfeld. Begin by nesting a `div` with a `class` of `formrow`, and nest four `div` elements inside of it, alternating their `class` attributes with `question-block` and `answer`. @@ -31,7 +31,7 @@ Du solltest `div.formrow` nach dem Element `h2` einfügen. assert.exists(document.querySelector('section:nth-of-type(3) > h2 + div.formrow')); ``` -You should nest four `div` elements inside `div.formrow`. +Du solltest vier `div`-Elemente in `div.formrow` einfügen. ```js assert.equal(document.querySelectorAll('section:nth-of-type(3) > div.formrow > div')?.length, 4); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f8f8bcd4370f6509078e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f8f8bcd4370f6509078e.md index ea34fe6544f..1170eceb924 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f8f8bcd4370f6509078e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f8f8bcd4370f6509078e.md @@ -7,7 +7,7 @@ dashedName: step-43 # --description-- -Within the `address` element, add the following: +Füge innerhalb des `address`-Elements folgendes hinzu: ```html freeCodeCamp
diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61488ecfd05e290b5712e6da.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61488ecfd05e290b5712e6da.md index 97734c07d50..39888534320 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61488ecfd05e290b5712e6da.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61488ecfd05e290b5712e6da.md @@ -11,14 +11,14 @@ To make the first section look more inline, target only the `input` elements wit # --hints-- -You should use either the `.info input` or `.info > input` selector. +Du solltest entweder den `.info input`- oder `.info > input`-Selektor verwenden. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); assert.exists(gs('.info input') || gs('.info > input')); ``` -You should give the `input` elements a `width` of `50%`. +Du solltest den `input`-Elementen eine `width` von `50%` geben. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.width; @@ -26,7 +26,7 @@ const width = gs('.info input') ?? gs('.info > input'); assert.equal(width, '50%'); ``` -You should give the `input` elements a `text-align` of `left`. +Du solltest dem `input`-Element ein `text-align` von `left` geben. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.textAlign; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md index fd7debcc98c..1674057d1fd 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md @@ -20,7 +20,7 @@ const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); assert.exists(gs('.info > label, .info > input') || gs('.info label, .info input') || gs('.info > input, .info > label') || gs('.info input, .info label')); ``` -You should give the `input` and `label` elements a `display` of `inline-block`. +Du solltest den `input`- und `label`-Elementen ein `display` von `inline-block` geben. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.display; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dc095264000dce348bf5.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dc095264000dce348bf5.md index d22661c4f9c..1689f99360a 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dc095264000dce348bf5.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dc095264000dce348bf5.md @@ -7,7 +7,7 @@ dashedName: step-58 # --description-- -To neaten the `.question-block` elements, set the following CSS properties: +Um die `.question-block`-Elemente zu ordnen, verwende die folgenden CSS Eigenschaften: ```css text-align: left; @@ -19,37 +19,37 @@ padding-top: 5px; # --hints-- -You should use the `.question-block` selector. +Du solltest den `.question-block`-Selektor verwenden. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('.question-block')); ``` -You should give the `.question-block` element a `display` of `block`. +Du solltest dem `.question-block`-Element ein `display` von `block` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.display, 'block'); ``` -You should give the `.question-block` element a `width` of `100%`. +Du solltest dem `.question-block`-Element eine `width` von `100%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.width, '100%'); ``` -You should give the `.question-block` element a `margin-top` of `20px`. +Du solltest dem `.question-block`-Element ein `margin-top` von `20px` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.marginTop, '20px'); ``` -You should give the `.question-block` element a `padding-top` of `5px`. +Du solltest dem `.question-block`-Element ein `padding-top` von `5px` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.paddingTop, '5px'); ``` -You should give the `.question-block` element a `text-align` of `left`. +Du solltest dem `.question-block` Element ein `text-align` von `left` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.textAlign, 'left'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md index afae9fb5220..31ad87a757b 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md @@ -11,19 +11,19 @@ Remove the default styling for the list items of `.answers-list`, and remove the # --hints-- -You should use the `.answers-list` selector. +Du solltest den `.answers-list`-Selektor verwenden. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('.answers-list')); ``` -You should give `.answers-list` a `list-style` of `none`. +Du solltest `.answers-list` ein `list-style` von `none` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.answers-list')?.listStyle, 'none'); ``` -You should give `.answers-list` a `padding` of `0`. +Du solltest `.answers-list` ein `padding` von `0` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.answers-list')?.padding, '0px'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33071498eb2472b87ddee4.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33071498eb2472b87ddee4.md index 58eed7369cd..94ecf218fc9 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33071498eb2472b87ddee4.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33071498eb2472b87ddee4.md @@ -25,7 +25,7 @@ You should have an opening `` tag with a `lang` attribute of `en`. assert(code.match(//gi)); ``` -You should have a closing `` tag. Remember that closing tags have a `/` following the opening `<` bracket. +Du solltest ein schließendes ``-Tag haben. Remember that closing tags have a `/` following the opening `<` bracket. ```js assert(code.match(/<\/html>/i)); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3313e74582ad9d063e3a38.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3313e74582ad9d063e3a38.md index 5029467b1ba..5429835559b 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3313e74582ad9d063e3a38.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3313e74582ad9d063e3a38.md @@ -7,11 +7,11 @@ dashedName: step-2 # --description-- -Add a `head` element within the `html` element, so you can add a `title` element. Der Text des `title`-Elements sollte `Cafe Menu` sein. +Erstelle ein `head`-Element innerhalb des `html`-Elements, so dass du ein `title`-Element hinzufügen kannst. Der Text des `title`-Elements sollte `Cafe Menu` sein. # --hints-- -You should have an opening `` tag. +Du solltest ein öffnendes ``-Tag haben. ```js assert(code.match(//i)); @@ -23,7 +23,7 @@ Du solltest ein schließendes ``-Tag haben. assert(code.match(//i)); ``` -You should have an opening `` tag. +Du solltest ein öffnendes `<title>` Tag haben. ```js assert(code.match(/<title>/i)); @@ -35,13 +35,13 @@ Du solltest ein schließendes ``-Tag haben. assert(code.match(/<\/title>/i)); ``` -Your `title` element should be nested in your `head` element. +Dein `title`-Element sollte sich innerhalb deines `head`-Elements befinden. ```js assert(code.match(/\s*.*<\/title>\s*<\/head>/si)); ``` -Your `title` element should have the text `Cafe Menu`. Möglicherweise musst du deine Rechtschreibung überprüfen. +Dein `title`-Element sollte den Text `Cafe Menu` haben. Möglicherweise musst du deine Rechtschreibung überprüfen. ```js assert.match(document.querySelector('title')?.innerText, /Cafe Menu/i); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3326b143638ee1a09ff1e3.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3326b143638ee1a09ff1e3.md index 2db63ef3bc0..04e60dc0483 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3326b143638ee1a09ff1e3.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3326b143638ee1a09ff1e3.md @@ -11,26 +11,26 @@ To prepare to create some actual content, add a `body` element below the `head` # --hints-- -You should have an opening `<body>` tag. +Du solltest ein öffnendes `<body>`-Tag haben. ```js assert(code.match(/<body>/i)); ``` -You should have a closing `</body>` tag. +Du solltest ein schließendes `</body>`-Tag haben. ```js assert(code.match(/<\/body>/i)); ``` -You should not change your `head` element. Make sure you did not delete your closing tag. +You should not change your `head` element. Stelle sicher, dass du dein schließendes Tag nicht gelöscht hast. ```js assert(code.match(/<head>/i)); assert(code.match(/<\/head>/i)); ``` -Your `body` element should come after your `head` element. +Dein `body`-Element sollte nach deinem `head`-Element stehen. ```js assert(code.match(/<\/head>[.\n\s]*<body>/im)); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344f9c805cd193c33d829c.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344f9c805cd193c33d829c.md index f9aa3ecfaae..116cc248526 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344f9c805cd193c33d829c.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344f9c805cd193c33d829c.md @@ -15,25 +15,25 @@ element { } ``` -Center your `h1` element by setting its `text-align` property to the value `center`. +Zentriere dein `h1`-Element, indem du die `text-align`-Eigenschaft auf den Wert `center` setzt. # --hints-- -You should have an `h1` selector in your `style` element. +Du solltest ein `h1`-Selektor in deinem `style`-Element haben. ```js const hasSelector = new __helpers.CSSHelp(document).getStyle('h1'); assert(hasSelector); ``` -Your `text-align` property should have a value of `center`. +Deine `text-align`-Eigenschaft sollte den Wert `center`-haben. ```js const hasTextAlign = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['text-align'] === 'center'); assert(hasTextAlign); ``` -Your `h1` selector should set the `text-align` property to `center`. +Dein `h1`-Selektor sollte die `text-align`-Eigenschaft auf `center` setzen. ```js const h1TextAlign = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('text-align'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fbc22624a2976425065.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fbc22624a2976425065.md index 5155032794c..6e1e4bc3004 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fbc22624a2976425065.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fbc22624a2976425065.md @@ -7,7 +7,7 @@ dashedName: step-9 # --description-- -Create an `h2` element in the `section` element and give it the text `Coffee`. +Erstelle ein `h2`-Element innerhalb des `section`-Elements und gib ihm den Text `Coffee`. # --hints-- @@ -29,7 +29,7 @@ Du solltest das vorhandene `section`-Element nicht verändern. Stelle sicher, da assert($('section').length === 1); ``` -Your `h2` element should be within your `section` element. +Dein `h2`-Element sollte sich innerhalb deines `section`-Elements befinden. ```js const h2 = document.querySelector('h2'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c4321f818cdc4bed30.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c4321f818cdc4bed30.md index 33713c78056..205071bfe24 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c4321f818cdc4bed30.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c4321f818cdc4bed30.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -It’s looking good. Time to start adding some menu items. Add an empty `article` element under the `Coffee` heading. It will contain a flavor and price of each coffee you currently offer. +Es sieht gut aus. Time to start adding some menu items. Füge ein leeres `article`-Element unter der `Coffee`-Überschrift hinzu. Es wird ein Aroma und Preis für jeden Kaffee, den du derzeit anbietest, enthalten. # --hints-- @@ -17,19 +17,19 @@ You should have an opening `<article>` tag. assert(code.match(/<article>/i)); ``` -You should have a closing `</article>` tag. +Du solltest ein schließendes `</article>`-Tag haben. ```js assert(code.match(/<\/article>/i)); ``` -You should not change the existing `h2` element. +Du solltest nicht das vorhandene `h2`-Element ändern. ```js assert($('h2').length === 1); ``` -Your `article` element should come after your `h2` element. +Dein `article`-Element sollte nach deinem `h2`-Element stehen. ```js const article = $('article')[0]; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9993019e26313fa8e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9993019e26313fa8e.md index c8305cac4e2..32582c8f41a 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9993019e26313fa8e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9993019e26313fa8e.md @@ -7,23 +7,23 @@ dashedName: step-42 # --description-- -Now that you know it works, you can change the remaining `article` and `p` elements to match the first set. Start by adding the class `item` to the other `article` elements. +Da du jetzt weißt, dass es funktioniert, kannst du die ausstehenden `article`- und `p`-Elemente so ändern, dass sie mit dem ersten Teil übereinstimmen. Beginne damit, die `item`-Klasse zu den anderen `article`-Elementen hinzuzufügen. # --hints-- -You should only have five `article` elements. +Du solltest nur fünf `article`-Elemente haben. ```js assert($('article').length === 5); ``` -You should only have five `.item` elements. +Du solltest nur fünf `.item`-Elemente haben. ```js assert($('.item').length === 5); ``` -Your `.item` elements should be your `article` elements. +Deine `.item`-Elemente sollten deinen `article`-Elementen entsprechen. ```js diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e087d56ed3ffdc36be.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e087d56ed3ffdc36be.md index fdb253e8bca..688955a531e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e087d56ed3ffdc36be.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e087d56ed3ffdc36be.md @@ -24,7 +24,7 @@ const established = $('.established'); assert(established[0].innerText.match(/Est\.\s2020/i)); ``` -Your `established` class element should have italic text. +Dein `established`-Klassen-Element sollte einen kursiven Text haben. ```js assert($('.established').css('font-style') === 'italic'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0b431cc215bb16f55.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0b431cc215bb16f55.md index 286677091a0..5718221921a 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0b431cc215bb16f55.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0b431cc215bb16f55.md @@ -11,13 +11,13 @@ Add a second `p` element below the one with the link and give it the text `123 F # --hints-- -You should add a second `p` element to your `footer`. +Du solltest ein zweites `p`-Element zu deinem `footer` hinzufügen. ```js assert($('footer').children('p').length === 2); ``` -Your new `p` element should have the text `123 Free Code Camp Drive`. Make sure your new element comes after your existing element. +Dein neues `p`-Element sollte den Text `123 Free Code Camp Drive` haben. Stelle sicher, dass dein neues Element nach deinem vorhandenen Element kommt. ```js assert($('footer').children('p').last().text().match(/123 Free Code Camp Drive/i)); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0e0c3feaebcf647ad.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0e0c3feaebcf647ad.md index eede72db68f..5e858da6e1e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0e0c3feaebcf647ad.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0e0c3feaebcf647ad.md @@ -7,23 +7,23 @@ dashedName: step-47 # --description-- -Add an `h2` element in the new section and give it the text `Desserts`. +Füge ein `h2`-Element in den neuen Abschnitt hinzu und gib ihm den Text `Desserts`. # --hints-- -You should not change your existing `section` element. +Du solltest nicht das vorhandene `section`-Element ändern. ```js assert($('section').length === 2); ``` -You should add an `h2` element in your second `section` element. +Du solltest ein `h2`-Element innerhalb des zweiten `section`-Elements verschachteln. ```js assert($('section')[1].children[0].tagName === 'H2'); ``` -Your new `h2` element should have the text `Desserts`. +Dein neues `h2`-Element sollte den Text `Desserts` haben. ```js assert($('h2')[1].innerText.match(/Desserts/i)); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0eaa7da26e3d34d78.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0eaa7da26e3d34d78.md index cdee97dc428..ec44f43e7d5 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0eaa7da26e3d34d78.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0eaa7da26e3d34d78.md @@ -13,28 +13,28 @@ Give the `menu` class a `padding-left` and a `padding-right` with the same value # --hints-- -You should set the `padding-left` property to `20px`. +Du solltest die `padding-left`-Eigenschaft auf `20px` setzen. ```js const hasPaddingLeft = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding-left'] === '20px'); assert(hasPaddingLeft); ``` -You should set the `padding-right` property to `20px`. +Du solltest die `padding-right`-Eigenschaft auf `20px` setzen. ```js const hasPaddingRight = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding-right'] === '20px'); assert(hasPaddingRight); ``` -Your `.menu` element should have a `padding-left` of `20px`. +Dein `.menu`-Element sollte ein `padding-left` von `20px` haben. ```js const menuPaddingLeft = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-left'); assert(menuPaddingLeft === '20px'); ``` -Your `.menu` element should have a `padding-right` of `20px`. +Dein `.menu`-Element sollte ein `padding-right` von `20px` haben. ```js const menuPaddingRight = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-right'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f46fc57528aa1c4b5ea7c2e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f46fc57528aa1c4b5ea7c2e.md index b4dcdbd88f0..7437408c0da 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f46fc57528aa1c4b5ea7c2e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f46fc57528aa1c4b5ea7c2e.md @@ -27,7 +27,7 @@ const hasMarginTop = new __helpers.CSSHelp(document).getCSSRules().some(x => x.s assert(hasMarginTop); ``` -Dein`.bottom-line`-Selektor sollte einen `margin-top` von `25px` haben. +Your `.bottom-line` selector should have a `margin-top` of `25px`. ```js const bottomLineMargin = new __helpers.CSSHelp(document).getStyle('.bottom-line')?.getPropertyValue('margin-top'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f769541be494f25449b292f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f769541be494f25449b292f.md index cda8158cc59..0e5e4a09077 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f769541be494f25449b292f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f769541be494f25449b292f.md @@ -7,25 +7,25 @@ dashedName: step-33 # --description-- -Using your new `flavor` class as a selector, set the `text-align` property's value to `left`. +Benutze deine neue `flavor`-Klasse als Selektor und setze den Wert der `text-align`-Eigenschaft auf `left`. # --hints-- -You should have a `flavor` class selector. +Du solltest einen `flavor`-Klassenselektor haben. ```js const hasFlavor = new __helpers.CSSHelp(document).getStyle('.flavor'); assert(hasFlavor); ``` -You should set the `text-align` property to `left`. +Du solltest die `text-align`-Eigenschaft auf `left` setzen. ```js const hasTextAlign = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['text-align'] === 'left'); assert(hasTextAlign); ``` -Your `flavor` class selector should set the `text-align` property to `left`. +Dein `flavor`-Klassenselektor sollte die `text-align`-Eigenschaft auf `left` setzen. ```js const flavorTextAlign = new __helpers.CSSHelp(document).getStyle('.flavor')?.getPropertyValue('text-align'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140de31b1f5b420410728ff.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140de31b1f5b420410728ff.md index d398ac38afa..9b506b8e5aa 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140de31b1f5b420410728ff.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140de31b1f5b420410728ff.md @@ -18,7 +18,7 @@ const rules = new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[0]?.css assert(rules?.[0]?.keyText === '100%' || rules?.[1]?.keyText === '100%'); ``` -Your `100%` selector should come after your `0%` selector. +Dein `100%`-Selektor sollte nach deinem `0%`-Selektor stehen. ```js assert(new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[0]?.cssRules?.[1]?.keyText === '100%') diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140df547f09402144e40b92.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140df547f09402144e40b92.md index fd39893d2f1..9520888b695 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140df547f09402144e40b92.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140df547f09402144e40b92.md @@ -7,9 +7,9 @@ dashedName: step-20 # --description-- -The `animation-name` property is used to link a `@keyframes` rule to a CSS selector. The value of this property should match the name of the `@keyframes` rule. Give your `.wheel` selector an `animation-name` property set to `wheel`. +The `animation-name` property is used to link a `@keyframes` rule to a CSS selector. Der Wert dieser Eigenschaft sollte mit dem Namen der `@keyframes`-Regel übereinstimmen. Give your `.wheel` selector an `animation-name` property set to `wheel`. -The `animation-duration` property is used to set how long the animation should sequence to complete. The time should be specified in either seconds (`s`) or milliseconds (`ms`). Set your `.wheel` selector to have an `animation-duration` property of `10s`. +The `animation-duration` property is used to set how long the animation should sequence to complete. Die Zeit sollte entweder in Sekunden (`s`) oder Millisekunden (`ms`) angegeben werden. Die `animation-duration`-Eigenschaft deines `.wheel`-Selektors sollte `10s` betragen. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140e0d875ec16262f26432b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140e0d875ec16262f26432b.md index fab544ac8b2..909bf8ab66f 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140e0d875ec16262f26432b.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140e0d875ec16262f26432b.md @@ -7,9 +7,9 @@ dashedName: step-21 # --description-- -The `animation-iteration-count` property sets how many times your animation should repeat. This can be set to a number, or to `infinite` to indefinitely repeat the animation. Your Ferris wheel should never stop, so set the `.wheel` selector to have an `animation-iteration-count` of `infinite`. +Die `animation-iteration-count`-Eigenschaft legt fest, wie oft deine Animation wiederholt werden soll. This can be set to a number, or to `infinite` to indefinitely repeat the animation. Your Ferris wheel should never stop, so set the `.wheel` selector to have an `animation-iteration-count` of `infinite`. -The `animation-timing-function` property sets how the animation should progress over time. There are a few different values for this property, but you want the Ferris wheel animation to run at the same rate from start to finish. Set the `animation-timing-function` to `linear` in your `.wheel` selector. +Die `animation-timing-function`-Eigenschaft legt fest, wie die Animation mit der Zeit verlaufen soll. There are a few different values for this property, but you want the Ferris wheel animation to run at the same rate from start to finish. Setze `animation-timing-function` innerhalb deines `.wheel`-Selektors auf `linear`. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140f4b5c1555a2960de1e5f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140f4b5c1555a2960de1e5f.md index 37c9cf16b92..1aa331506f2 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140f4b5c1555a2960de1e5f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140f4b5c1555a2960de1e5f.md @@ -24,7 +24,7 @@ const rules = new __helpers.CSSHelp(document).getCSSRules('keyframes'); assert(rules?.[0]?.name === 'cabins' || rules?.[1]?.name === 'cabins'); ``` -Your new `@keyframes` rule should come after your `@keyframes wheel` rule. +Deine neue `@keyframes`-Regel sollte nach deiner `@keyframes wheel`-Regel stehen. ```js assert(new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.name === 'cabins'); @@ -55,7 +55,7 @@ const rules = new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.css assert(rules?.[0]?.keyText === '100%' || rules?.[1]?.keyText === '100%'); ``` -Your `100%` selector should come after your `0%` selector. +Dein `100%`-Selektor sollte nach deinem `0%`-Selektor stehen. ```js assert(new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.cssRules?.[1]?.keyText === '100%') diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/614100d7d335bb2a5ff74f1f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/614100d7d335bb2a5ff74f1f.md index 77be9f9e497..54e7d465fd5 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/614100d7d335bb2a5ff74f1f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/614100d7d335bb2a5ff74f1f.md @@ -7,9 +7,9 @@ dashedName: step-23 # --description-- -With your `.wheel` selector, you created four different properties to control the animation. For your `.cabin` selector, you can use the `animation` property to set these all at once. +Mit deinem `.wheel`-Selektor hast du vier verschiedene Eigenschaften erstellt, um deine Animation zu steuern. For your `.cabin` selector, you can use the `animation` property to set these all at once. -Set the `animation` property of the `.cabin` rule to `cabins 10s linear infinite`. This will set the `animation-name`, `animation-duration`, `animation-timing-function`, and `animation-iteration-count` properties in that order. +Setze die `animation`-Eigenschaft der `.cabin`-Regel auf `cabins 10s linear infinite`. This will set the `animation-name`, `animation-duration`, `animation-timing-function`, and `animation-iteration-count` properties in that order. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169ab1aaeb4cd1174def700.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169ab1aaeb4cd1174def700.md index 7400d20b623..4b75e120028 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169ab1aaeb4cd1174def700.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169ab1aaeb4cd1174def700.md @@ -9,11 +9,11 @@ dashedName: step-27 Because the animation is on an infinite loop and the start and end colors are not the same, the transition appears jerky when it switches back to yellow from red. -To start fixing this, remove the `background-color` from your `0%` selector. +Entferne `background-color` aus deinem `0%`-Selektor, um mit der Behebung dieses Problems zu beginnen. # --hints-- -Your `0%` selector should not have a `background-color` property. +Dein `0%`-Selektor sollte keine `background-color`-Eigenschaft haben. ```js assert(!new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.cssRules?.[0]?.style?.backgroundColor); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169b1357fcb701bb5efc619.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169b1357fcb701bb5efc619.md index 9f6054b3af6..8fdd252c1a7 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169b1357fcb701bb5efc619.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169b1357fcb701bb5efc619.md @@ -7,18 +7,18 @@ dashedName: step-28 # --description-- -Create a new `25%` selector between your `0%` and `50%` selectors. Give this new selector the `background-color` property set to `yellow`. +Erstelle einen neuen `25%`-Selektor zwischen deinen `0%`- und `50%`-Selektoren. Give this new selector the `background-color` property set to `yellow`. # --hints-- -You should create a new `25%` selector in your `@keyframes cabins` rule. +Du solltest einen neuen `25%`-Selektor in deiner `@keyframes cabins`-Regel erstellen. ```js const rules = new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.cssRules; assert(rules?.[0]?.keyText === '25%' || rules?.[1]?.keyText === '25%' || rules?.[2]?.keyText === '25%' || rules?.[3]?.keyText === '25%'); ``` -Your `25%` selector should be between your `0%` and `50%` selectors. +Dein `25%`-Selektor sollte sich zwischen deinen `0%`- und `50%`-Selektoren befinden. ```js assert(new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.cssRules?.[1]?.keyText === '25%'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537485c4f2a624f18d7794.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537485c4f2a624f18d7794.md index 224c8e23574..4bf9e995236 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537485c4f2a624f18d7794.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537485c4f2a624f18d7794.md @@ -73,7 +73,7 @@ Du solltest ein schließendes `head`-Tag haben. assert(code.match(/<\/head\s*>/i)); ``` -You should have an opening `body` tag. +Du solltest ein öffnendes `body`-Tag haben. ```js assert(code.match(/<body\s*>/i)); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537bb9b1a29430ac15ad38.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537bb9b1a29430ac15ad38.md index 7121a03e0af..fa3f553142d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537bb9b1a29430ac15ad38.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537bb9b1a29430ac15ad38.md @@ -7,7 +7,7 @@ dashedName: step-3 # --description-- -Within your `head` element, add a `title` element with the text set to `Photo Gallery`, and a `link` element to add your `styles.css` file to the page. +Füge in deinem `head`-Element ein `title`-Element mit dem Text `Photo Gallery` und ein `link`-Element hinzu, um deine `styles.css`-Datei zur Seite hinzuzufügen. # --hints-- @@ -17,7 +17,7 @@ Your `link` element should have an `href` attribute with the value `styles.css`. assert.match(code, /<link[\s\S]*?href=('|"|`)(\.\/)?styles\.css\1/) ``` -Your code should have a `title` element. +Dein Code sollte ein `title`-Element haben. ```js const title = document.querySelector('title'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md index fd62bcc185f..f18f5b88857 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md @@ -25,7 +25,7 @@ Your new `div` element should have a `class` with `gallery` set as the value. assert(document.querySelector('body')?.querySelector('.gallery')); ``` -Your new `div` element should come after your `.header` element. +Dein neues `div`-Element sollte nach deinem `.header`-Element stehen. ```js assert(document.querySelector('header')?.nextElementSibling?.classList?.contains('gallery')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153897c27f6334716ee5abe.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153897c27f6334716ee5abe.md index 57b2b096231..3811cf1fa62 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153897c27f6334716ee5abe.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153897c27f6334716ee5abe.md @@ -9,14 +9,14 @@ dashedName: step-10 Align your `.header` text in the center. Make the text uppercase using the `text-transform` property with `uppercase` as the value. -Give it a padding of `32px` on all sides. Set the background to `#0a0a23` and the text to `#fff` as the color values. +Gib ihm auf allen Seiten ein Padding von `32px`. Setze die Farbwerte des Hintergrundes auf `#0a0a23` und des Textes auf `#fff`. Füge einen `border-bottom` mit `4px solid #fdb347` als Wert hinzu. # --hints-- -You should have a `.header` selector. +Du solltest einen `.header`-Selektor haben. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('.header')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/615389bd81347947ea7ba896.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/615389bd81347947ea7ba896.md index c0eec18fb02..7ce02fc3af9 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/615389bd81347947ea7ba896.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/615389bd81347947ea7ba896.md @@ -7,15 +7,15 @@ dashedName: step-11 # --description-- -Flexbox is a one-dimensional CSS layout that can control the way items are spaced out and aligned within a container. +Flexbox ist ein eindimensionales CSS-Layout, das steuern kann, wie Elemente innerhalb eines Containers angeordnet und ausgerichtet sind. -To use it, give an element a `display` property of `flex`. This will make the element a <em>flex container</em>. Any direct children of a flex container are called <em>flex items</em>. +Um es zu verwenden, gib einem Element eine `display`-Eigenschaft von `flex`. Das wird das Element zu einem <em>flex container</em> machen. Alle direkt untergeordneten Elemente eines Flex-Containers werden <em>flex items</em> genannt. -Create a `.gallery` selector and make it a flex container. +Erstelle einen `.gallery`-Selektor und mache ihn zu einem Flex-Container. # --hints-- -You should have a `.gallery` selector. +Du solltest einen `.gallery`-Selektor haben. ```js assert(new __helpers.CSSHelp(document).getStyle('.gallery')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153908a366afb4d57185c8d.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153908a366afb4d57185c8d.md index 89592686682..24c813b0818 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153908a366afb4d57185c8d.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153908a366afb4d57185c8d.md @@ -7,7 +7,7 @@ dashedName: step-12 # --description-- -Flexbox hat eine Haupt- und Querachse. The main axis is defined by the `flex-direction` property, which has four possible values: +Flexbox hat eine Haupt- und Querachse. Die Hauptachse wird durch die `flex-direction`-Eigenschaft definiert, die vier mögliche Werte hat: - `row` (Standard): horizontale Achse mit Flex-Elementen von links nach rechts - `row-reverse`: horizontale Achse mit Flex-Elementen von rechts nach links @@ -16,7 +16,7 @@ Flexbox hat eine Haupt- und Querachse. The main axis is defined by the `flex-dir **Note**: Die Achsen und Richtungen unterscheiden sich je nach Textrichtung. Die angegebenen Werte sind für eine Textrichtung von links nach rechts bestimmt. -Try the different values to see how they affect the layout. +Teste verschiedene Werte, um zu sehen, wie sie das Layout beeinflussen. When you are done, set an explicit `flex-direction` of `row` on the `.gallery` element. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/615392916d83fa4f02f7e2cf.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/615392916d83fa4f02f7e2cf.md index eda2a87b541..c5b861001a2 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/615392916d83fa4f02f7e2cf.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/615392916d83fa4f02f7e2cf.md @@ -8,7 +8,7 @@ dashedName: step-13 # --description-- -The `flex-wrap` property determines how your flex items behave when the flex container is too small. Setting it to `wrap` will allow the items to wrap to the next row or column. Wenn nötig verhindert `nowrap` (standardmäßig) das Umbrechen oder Schrumpfen der Elemente. +Die `flex-wrap`-Eigenschaft legt fest, wie sich deine Flex-Elemente verhalten, wenn der Flex-Container zu klein ist. Setting it to `wrap` will allow the items to wrap to the next row or column. Wenn nötig verhindert `nowrap` (standardmäßig) das Umbrechen oder Schrumpfen der Elemente. Make it so your flex items wrap to the next row when they run out of space. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61539e07e7430b528fbffe21.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61539e07e7430b528fbffe21.md index b71f8f27d3f..aad0828eb9e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61539e07e7430b528fbffe21.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61539e07e7430b528fbffe21.md @@ -7,7 +7,7 @@ dashedName: step-16 # --description-- -Give your `.gallery` selector a `padding` property set to `20px 10px` to create some space around the container. +Gib deinem `.gallery`-Selektor eine `padding`-Eigenschaft von `20px 10px`, um Platz um den Container herum zu schaffen. Then, give it a `max-width` of `1400px` and add a `margin` of `0 auto` to center it. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61539f32a206bd53ec116465.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61539f32a206bd53ec116465.md index 6d0e7551fab..79bde80b065 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61539f32a206bd53ec116465.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/61539f32a206bd53ec116465.md @@ -9,7 +9,7 @@ dashedName: step-17 Beachte, dass einige deiner Bilder verzerrt sind. Das liegt daran, dass die Bilder verschiedene Seitenverhältnisse haben. Statt jedes Seitenverhältnis einzeln anzupassen, kannst du die `object-fit`-Eigenschaft verwenden, um zu bestimmen, wie Bilder sich verhalten sollten. -Give your `.gallery img` selector the `object-fit` property and set it to `cover`. Dadurch wird dem Bild angewiesen den `img`-Container zu füllen, während das Seitenverhältnis beibehalten wird. Dies führt dazu, dass das Bild passend zugeschnitten wird. +Gib deinem `.gallery img`-Selektor die `object-fit`-Eigenschaft und setze ihn auf `cover`. Dadurch wird dem Bild angewiesen den `img`-Container zu füllen, während das Seitenverhältnis beibehalten wird. Dies führt dazu, dass das Bild passend zugeschnitten wird. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6143a1a228f7d068ab16a130.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6143a1a228f7d068ab16a130.md index 340fa47cee0..293d5fb6693 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6143a1a228f7d068ab16a130.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6143a1a228f7d068ab16a130.md @@ -15,19 +15,19 @@ No more walls of explanatory text. No more walls of tests. Just one test at a ti # --hints-- -You should add a fourth `p` element to your `.text` element. +Du solltest ein viertes `p`-Element zu deinem `.text`-Element hinzufügen. ```js assert(document.querySelectorAll('.text p')?.length === 5); ``` -Your new `p` element should come after your `blockquote` element. +Dein neues `p`-Element sollte nach deinem `blockquote`-Element stehen. ```js assert(document.querySelectorAll('.text p')?.[4]?.previousElementSibling?.localName === 'blockquote'); ``` -Your new `p` element should have the provided text. +Dein neues `p`-Element sollte den angegebenen Text enthalten. ```js assert(document.querySelectorAll('.text p')?.[4]?.innerText === 'No more walls of explanatory text. No more walls of tests. Just one test at a time, as you build up a working project. Over the course of passing thousands of tests, you build up projects and your own understanding of coding fundamentals. There is no transition between lessons and projects, because the lessons themselves are baked into projects. And there\'s plenty of repetition to help you retain everything because - hey - building projects in real life has plenty of repetition.'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6143a73279ce6369de4b9bcc.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6143a73279ce6369de4b9bcc.md index 27b213108cd..ab762fa22ec 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6143a73279ce6369de4b9bcc.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6143a73279ce6369de4b9bcc.md @@ -7,7 +7,7 @@ dashedName: step-16 # --description-- -Create a fifth `p` element at the end of your `.text` element, and give it the following text: +Erstelle am Ende deines `.text`-Elements ein fünftes `p`-Element und gib ihm den folgenden Text: ```markup The main design challenge is taking what is currently paragraphs of explanation and instructions and packing them into a single test description text. Each project will involve dozens of tests like this. People will be coding the entire time, rather than switching back and forth from "reading mode" to "coding mode". @@ -21,7 +21,7 @@ Du solltest ein fünftes `p`-Element hinzufügen. assert(document.querySelectorAll('.text p')?.length === 6); ``` -Your new `p` element should have the provided text. +Dein neues `p`-Element sollte den angegebenen Text enthalten. ```js assert(document.querySelectorAll('.text p')?.[5]?.innerText === 'The main design challenge is taking what is currently paragraphs of explanation and instructions and packing them into a single test description text. Each project will involve dozens of tests like this. People will be coding the entire time, rather than switching back and forth from "reading mode" to "coding mode".'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98c9.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98c9.md index 5159eb553f8..c0cfe27b6cf 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98c9.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98c9.md @@ -7,35 +7,35 @@ dashedName: step-1 # --description-- -Welcome to the CSS Variables Skyline project! Start by adding the `!DOCTYPE html` declaration at the top of the document so the browser knows what type of document it's reading. +Willkommen im CSS-Variablen-Skyline-Projekt! Beginne, indem du die `!DOCTYPE html`-Deklaration oben auf dem Dokument hinzufügst, damit der Browser weiß, welche Art von Dokument er ließt. # --hints-- -Your code should contain the `DOCTYPE` reference. +Dein Code sollte die `DOCTYPE`-Referenz enthalten. ```js assert(code.match(/<!DOCTYPE/gi)); ``` -You should include a space after the `DOCTYPE` reference. +Du solltest ein Leerzeichen nach der `DOCTYPE`-Referenz einfügen. ```js assert(code.match(/<!DOCTYPE\s+/gi)); ``` -You should define the document type to be `html`. +Du solltest den Dokumententyp als `html` definieren. ```js assert(code.match(/html/gi)); ``` -You should close the `DOCTYPE` declaration with a `>` after the type. +Du solltest die `DOCTYPE`-Deklaration mit einem `>` nach dem Typ schließen. ```js assert(code.match(/html\s*>/gi)); ``` -Your `DOCTYPE` declaration should be at the beginning of your HTML. +Deine `DOCTYPE`-Deklaration sollte am Anfang deines HTML stehen. ```js assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i)); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ca.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ca.md index 53cbe8ff42d..2f82b48146c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ca.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ca.md @@ -7,35 +7,35 @@ dashedName: step-2 # --description-- -Add opening and closing `html` tags below the `DOCTYPE` so you have a place to start putting some code. Be sure to set the language to English. +Füge öffnende und schließende `html`-Tags unter `DOCTYPE` hinzu, so dass du Platz hast, um mit der Eingabe vom Code zu beginnen. Achte darauf, die Sprache auf Englisch zu setzen. # --hints-- -Your `DOCTYPE` declaration should be at the beginning of your HTML. +Deine `DOCTYPE`-Deklaration sollte am Anfang deines HTML stehen. ```js assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i)); ``` -Your `html` element should have an opening tag, and `lang` attribute with value of `en`. +Dein `html`-Element sollte einen öffnenden Tag haben und ein `lang`-Attribut mit dem Wert `en`. ```js assert(code.match(/<html\s+lang\s*=\s*('|")en\1\s*>/gi)); ``` -Your `html` element should have a closing tag. +Dein `html`-Element sollte einen abschließenden Tag haben. ```js assert(code.match(/<\/html\s*>/)); ``` -Your `html` tags should be in the correct order. +Deine `html`-Tags sollten in der richtigen Reihenfolge sein. ```js assert(code.match(/<html\s+lang\s*=\s*('|")en\1\s*>\s*<\/html\s*>/)); ``` -You should only have one `html` element. +Du solltest nur ein `html`-Element haben. ```js assert(document.querySelectorAll('html').length === 1); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cb.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cb.md index 115d7467066..e574252d0a4 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cb.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cb.md @@ -7,47 +7,47 @@ dashedName: step-3 # --description-- -Next, add opening and closing `head` and `body` tags within the `html` element. +Füge als nächstes öffnende und abschließende `head` und `body`-Tags innerhalb des `html`-Elements hinzu. # --hints-- -You should have an opening `head` tag. +Du solltest einen öffnenden `head`-Tag haben. ```js assert(code.match(/<head\s*>/i)); ``` -You should have a closing `head` tag. +Du solltest einen abschließenden `head`-Tag haben. ```js assert(code.match(/<\/head\s*>/i)); ``` -You should have an opening `body` tag. +Du solltest einen öffnenden `body`-Tag haben. ```js assert(code.match(/<body\s*>/i)); ``` -You should have a closing `body` tag. +Du solltest einen abschließenden `body`-Tag haben. ```js assert(code.match(/<\/body\s*>/i)); ``` -The `head` and `body` elements should be siblings. +Das `head` und `body`-Element sollten Geschwister sein. ```js assert(document.querySelector('head').nextElementSibling.localName === 'body'); ``` -The `head` element should be within the `html` element. +Das `head`-Element sollte sich innerhalb des `html`-Elements befinden. ```js assert([...document.querySelector('html').children].some(x => x.localName === 'head')); ``` -The `body` element should be within the `html` element. +Das `body`-Element sollte sich innerhalb des `html`-Elements befinden. ```js assert([...document.querySelector('html').children].some(x => x.localName === 'body')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cc.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cc.md index 975130285e0..0f220c9a367 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cc.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cc.md @@ -7,75 +7,75 @@ dashedName: step-4 # --description-- -Within the `head`, nest a `meta` element with a `charset` of `UTF-8`, a `title` element with a title of `City Skyline`, and a `link` element that links your `styles.css` file. +Niste innerhalb des `head` ein `meta`-Element mit einem `charset` von `UTF-8` ein, ein `title`-Element mit dem Titel `City Skyline`, und ein `link`-Element, das deine `styles.css` Datei verlinkt. # --hints-- -You should create a `meta` element within the `head` element. +Du solltest ein `meta`-Element innerhalb des `head`-Elements erstellen. ```js assert.exists(document.querySelector('head > meta')); ``` -You should give the `meta` tag a `charset` of `UTF-8`. +Du solltest dem `meta`-Tag ein `charset` von `UTF-8` geben. ```js assert.equal(document.querySelector('head > meta')?.getAttribute('charset')?.toLowerCase(), 'utf-8'); ``` -Your code should have a `title` element. +Dein Code sollte ein `title`-Element haben. ```js const title = document.querySelector('title'); assert.exists(title); ``` -The `title` element should be within the `head` element. +Das `title`-Element sollte sich innerhalb des `head`-Elements befinden. ```js assert.exists(document.querySelector('head > title')); ``` -Your project should have a title of `City Skyline`. +Dein Projekt sollte den Titel `City Skyline` tragen. ```js const title = document.querySelector('title'); assert.equal(title.text.toLowerCase(), 'city skyline') ``` -Remember, the casing and spelling matters for the title. +Denke daran, dass Schreibweise und Rechtschreibung für den Titel wichtig sind. ```js const title = document.querySelector('title'); assert.equal(title.text, 'City Skyline'); ``` -Your code should have a `link` element. +Dein Code sollte ein `link`-Element haben. ```js assert.match(code, /<link/) ``` -You should not change your existing `head` tags. Make sure you did not delete the closing tag. +Du solltest die vorhandenen `head`-Tags nicht ändern. Stelle sicher, dass du den abschließenden Tag nicht gelöscht hast. ```js const heads = document.querySelectorAll('head'); assert.equal(heads?.length, 1); ``` -You should have one self-closing `link` element. +Du solltest ein selbstschießendes `link`-Element haben. ```js assert(document.querySelectorAll('link').length === 1); ``` -Your `link` element should be within your `head` element. +Dein `link`-Element sollte sich innerhalb deines `head`-Elements befinden. ```js assert.exists(document.querySelector('head > link')); ``` -Your `link` element should have a `rel` attribute with the value `stylesheet`. +Dein `link`-Element sollte ein `rel`-Attribut mit dem Wert `stylesheet` haben. ```js const link_element = document.querySelector('link'); @@ -83,7 +83,7 @@ const rel = link_element.getAttribute("rel"); assert.equal(rel, "stylesheet"); ``` -Your `link` element should have an `href` attribute with the value `styles.css`. +Dein `link`-Element sollte ein `href`-Attribut mit dem Wert `styles.css` haben. ```js const link = document.querySelector('link'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cd.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cd.md index 6c62a2f92cb..b28cf6bb4e8 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cd.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cd.md @@ -7,23 +7,23 @@ dashedName: step-5 # --description-- -In CSS, you can target everything with an asterisk. Add a border to everything by using the `*` selector, and giving it a `border` of `1px solid black`. This is a trick that helps visualize where elements are and their size. You will remove this later. +In CSS kannst du alles mit einem Sternchen anvisieren. Füge einen Rand zu allem hinzu, indem du den `*`-Selekor verwendest, und gib ihm einen `border` von `1px solid black`. Dies ist ein Trick, der hilft den Standort und die Größe der Elemente zu visualisieren. Du wirst dies später entfernen. # --hints-- -You should use the `*` selector. +Du solltest den `*`-Selektor verwenden. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('*')); ``` -You should use the `border` property to style all the elements. +Du solltest die `border`-Eigenschaft verwenden, um alle Elemente zu gestalten. ```js assert(new __helpers.CSSHelp(document).isPropertyUsed('border')); ``` -All elements should have a `1px solid black` border. +Alle Elemente sollten einen `1px solid black`-Rand haben. ```js const astStyles = new __helpers.CSSHelp(document).getStyle('*'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ce.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ce.md index e58dfe99288..1277ee36675 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ce.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ce.md @@ -7,24 +7,24 @@ dashedName: step-6 # --description-- -Also add a `box-sizing` of `border-box` to everything. This will make it so the border you added doesn't add any size to your elements. +Füge außerdem eine `box-sizing` von `border-box` zu allem hinzu. Dadurch wird der Rahmen, den du hinzugefügt hast, nicht größer als deine Elemente. # --hints-- -You should use the `box-sizing` property. +Du solltest die `box-sizing`-Eigenschaft verwenden. ```js assert(new __helpers.CSSHelp(document).isPropertyUsed('box-sizing')); ``` -You should make use of the existing `*` selector. +Du solltest vom vorhandenen `*`-Selektor Gebrauch machen. ```js // Two selectors create two CSSStyleRule objects assert.equal(new __helpers.CSSHelp(document).getStyleDeclarations('*').length, 1); ``` -All elements should have a `box-sizing` of `border-box`. +Alle Elemente sollten einen `box-sizing` von `border-box` haben. ```js const astStyles = new __helpers.CSSHelp(document).getStyle('*'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cf.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cf.md index 2aa67c45a0e..af9b3c8569e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cf.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cf.md @@ -7,30 +7,30 @@ dashedName: step-7 # --description-- -You can see the `body` (it's the inner-most box on your page); the box around it is the `html` element. Make your `body` fill the whole viewport by giving it a `height` of `100vh`. Remove the default `margin` from the `body` by setting the `margin` to `0`. Finally, set the `overflow` property to `hidden` to hide any scroll bars that appear when something extends past the viewport. +Du kannst den `body` (die innerste Box deiner Seite) sehen; die Box um ihn herum ist das `html`-Element. Lasse deinen `body` das gesamte Anzeigefenster füllen, indem du ihm eine `height` von `100vh` gibst. Entferne die voreingestellte `margin` aus dem `body`, indem du `margin` auf `0` setzt. Setzte schließlich die `overflow`-Eigenschaft auf `hidden`, um jegliche Scroll-Leisten zu verstecken, die erscheinen, wenn etwas über das Anzeigefenster hinausgeht. # --hints-- -You should use the `body` selector. +Du solltest den `body`-Selektor verwenden. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('body')); ``` -Your `body` should have a `height` of `100vh`. +Dein `body` sollte eine `height` von `100vh` haben. ```js const bodyStyles = new __helpers.CSSHelp(document).getStyle('body'); assert.equal(bodyStyles?.height, '100vh'); ``` -Your `body` should have a `margin` of `0`. +Dein `body` sollte eine `margin` von `0` haben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.margin, '0px'); ``` -Your `body` should have the `overflow` property set to `hidden`. +Dein `body` sollte eine `overflow`-Eigenschaft auf `hidden` gesetzt haben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.overflow, 'hidden'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d0.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d0.md index da80702f856..563a7ce77fe 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d0.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d0.md @@ -7,23 +7,23 @@ dashedName: step-8 # --description-- -Create a `div` element in the `body` with a class of `background-buildings`. This will be a container for a group of buildings. +Erstelle ein `div`-Element in dem `body` mit einer Klasse von `background-buildings`. Dies wird ein Container für eine Gruppe von Bauelementen sein. # --hints-- -You should create a `div` element. +Du solltest ein `div`-Element erstellen. ```js assert.exists(document.querySelector('div')); ``` -Your `div` element should be within the `body`. +Dein `div`-Element sollte sich innerhalb des `body` befinden. ```js assert(document.querySelector('div')?.parentElement?.localName === 'body'); ``` -Your `div` element should have a class of `background-buildings` +Dein `div`-Element sollte eine Klasse von `background-buildings` haben ```js assert([...document.querySelector('div')?.classList]?.includes('background-buildings')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d1.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d1.md index 67f39215c1e..04be00e3d82 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d1.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d1.md @@ -7,23 +7,23 @@ dashedName: step-9 # --description-- -Give your `.background-buildings` element a `width` and `height` of `100%` to make it the full width and height of its parent, the `body`. +Gib deinem `.background-buildings`-Element eine `width` und `height` von `100%`, um die volle Breite und Höhe ihres übergeordneten Elements, dem `body`, einzunehmen. # --hints-- -You should use the `background-buildings` class to select the correct element. +Du solltest die `background-buildings`-Klasse zur Auswahl des richtigen Elements verwenden. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('.background-buildings')); ``` -Your `.background-buildings` element should have a `width` of `100%`. +Dein `.background-buildings`-Element sollte eine `width` von `100%` haben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.background-buildings')?.width, '100%'); ``` -Your `.background-buildings` element should have a `height` of `100%`. +Dein `.background-buildings`-Element sollte eine `height` von `100%` haben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.background-buildings')?.height, '100%'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d2.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d2.md index 23e13ad379d..aa26f139812 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d2.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d2.md @@ -7,35 +7,35 @@ dashedName: step-10 # --description-- -Nest a `div` with a class of `bb1` in the background buildings container. Open your `styles.css` file, and give `.bb1` a `width` of `10%` and `height` of `70%`. "bb" stands for "background building", this will be your first building. +Niste im Container der Hintergrundbauten einen `div` mit einer Klasse von `bb1`. Öffne deine `styles.css`-Datei und gib `.bb1` eine `width` von `10%` und `height` von `70%`. "bb" steht für "background building", dies wird dein erstes Gebäude sein. # --hints-- -You should create a new `div` element. +Du solltest ein neues `div`-Element erstellen. ```js assert.equal(document.querySelectorAll('div').length, 2); ``` -You should give the new `div` a class of `bb1`. +Du solltest dem neuen `div` eine Klasse von `bb1` geben. ```js assert.exists(document.querySelector('div.bb1')); ``` -You should use a `.bb1` class selector to style the element. +Du solltest einen `.bb1`-Klassen-Selektor verwenden, um das Element zu gestalten. ```js assert.exists(new __helpers.CSSHelp(document).getStyle('.bb1')); ``` -You should give the `.bb1` element a `width` of `10%`. +Du solltest dem `.bb1`-Element eine `width` von `10%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.bb1')?.width, '10%'); ``` -You should give the `.bb1` element a `height` of `70%`. +Du solltest dem `.bb1`-Element eine `height` von `70%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.bb1')?.height, '70%'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d3.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d3.md index 7f05344b700..ead8f558a68 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d3.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98d3.md @@ -7,7 +7,7 @@ dashedName: step-11 # --description-- -Nest four `div` elements in the `.bb1` container. Give them the classes `bb1a`, `bb1b`, `bb1c`, and `bb1d` in that order. This building will have four sections. +Niste vier `div` Elemente in den `.bb1` Container. Gib ihnen die Klassen `bb1a`, `bb1b`, `bb1c` und `bb1d` in dieser Reihenfolge. Dieses Bauelement wird aus vier Teilen bestehen. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9900.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9900.md index d1028139491..ae6c29031ef 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9900.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9900.md @@ -17,7 +17,7 @@ Du solltest den `border-left` so ändern, dass er `transparent` verwendet. assert.equal(new __helpers.CSSHelp(document).getStyle(".bb2a")?.borderLeft, "5vw solid transparent"); ``` -You should change the `border-right` to use `transparent`. +Du solltest den `border-right` so ändern, dass er `transparent` verwendet. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb2a")?.borderRight, "5vw solid transparent"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9901.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9901.md index 3af5445bf3b..bf6b28aec9c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9901.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9901.md @@ -11,13 +11,13 @@ Remove the `margin` and `border-top` properties and values from `.bb2a` to turn # --hints-- -You should remove the `margin` from `.bb2a`. +Du solltest die `margin` aus `.bb2a` entfernen. ```js assert.isEmpty(new __helpers.CSSHelp(document).getStyle(".bb2a")?.margin); ``` -You should remove the `border-top` from `.bb2a`. +Du solltest den `border-top` aus `.bb2a` entfernen. ```js assert.isEmpty(new __helpers.CSSHelp(document).getStyle(".bb2a")?.borderTop); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9902.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9902.md index e9b4b67c76e..a048a78b351 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9902.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9902.md @@ -7,7 +7,7 @@ dashedName: step-58 # --description-- -Finally, on the `border-bottom` property of `.bb2a`, change the `1vw` to `5vh` and change the `#000` color to your `--building-color2` variable. There you go, now it looks good! At any time throughout this project, you can comment out or remove the `border` property you added to everything at the beginning to see what the buildings will look like when that gets removed at the end. +Finally, on the `border-bottom` property of `.bb2a`, change the `1vw` to `5vh` and change the `#000` color to your `--building-color2` variable. Na bitte, jetzt sieht es gut aus! At any time throughout this project, you can comment out or remove the `border` property you added to everything at the beginning to see what the buildings will look like when that gets removed at the end. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9904.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9904.md index 0cc9ecb5b72..d5b8aa9a0fd 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9904.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9904.md @@ -7,7 +7,7 @@ dashedName: step-60 # --description-- -So far, all the gradients you created have gone from top to bottom, that's the default direction. You can specify another direction by adding it before your colors like this: +Bisher sind alle von dir erstellten Farbverläufe von oben nach unten verlaufen, das ist die Standardrichtung. You can specify another direction by adding it before your colors like this: ```css gradient-type( @@ -27,13 +27,13 @@ You should give `.bb3` a `background` using `repeating-linear-gradient`. assert.include(new __helpers.CSSHelp(document).getStyle(".bb3")?.background, "repeating-linear-gradient"); ``` -You should use `90deg` for the direction in the first argument of `repeating-linear-gradient`. +Du solltest `90deg` für die Richtung im ersten Argument von `repeating-linear-gradient` verwenden. ```js assert.include(new __helpers.CSSHelp(document).getStyle(".bb3")?.getPropVal('background', true), "repeating-linear-gradient(90deg"); ``` -You should use `--building-color3` for the first two colors. +Du solltest `--building-color3` für die ersten beiden Farben verwenden. ```js assert.include(new __helpers.CSSHelp(document).getStyle(".bb3")?.getPropVal('background', true), "repeating-linear-gradient(90deg,var(--building-color3),var(--building-color3)"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9905.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9905.md index 2e6d3c05e5b..7b0778c7979 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9905.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9905.md @@ -7,11 +7,11 @@ dashedName: step-61 # --description-- -Remove the `background-color` property and value from `.bb3` since you are using the gradient as the background now. +Entferne die `background-color`-Eigenschaft und den Wert aus `.bb3`, da du jetzt den Farbverlauf als Hintergrund verwendest. # --hints-- -You should remove the `background-color` from `.bb3`. +Du solltest die `background-color` aus `.bb3` entfernen. ```js assert.notMatch(code, /\.bb3\s*\{\s*[^}]*?background-color[^}]*?\}/); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9906.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9906.md index 30a89bb0cec..20515469b6f 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9906.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9906.md @@ -7,35 +7,35 @@ dashedName: step-62 # --description-- -The next building will have three sections. Nest three `div` elements within `.bb4`. Give them the classes of `bb4a`, `bb4b` and `bb4c` in that order. +The next building will have three sections. Verschachtele drei `div`-Elemente innerhalb von `.bb4`. Give them the classes of `bb4a`, `bb4b` and `bb4c` in that order. # --hints-- -You should add three `div` elements within `.bb4`. +Du solltest drei `div`-Elemente innerhalb von `.bb4` hinzufügen. ```js assert.equal(document.querySelector("div.bb4")?.children?.length, 3); ``` -You should give the first new `div` a class of `bb4a`. +Du solltest dem ersten neuen `div` eine Klasse von `bb4a` zuweisen. ```js assert.exists(document.querySelector("div.bb4 > div.bb4a")); ``` -You should give the second new `div` a class of `bb4b`. +Du solltest dem zweiten neuen `div` eine Klasse von `bb4b` zuweisen. ```js assert.exists(document.querySelector("div.bb4 > div.bb4a")); ``` -You should give the third new `div` a class of `bb4c`. +Du solltest dem dritten neuen `div` die Klasse `bb4c` zuweisen. ```js assert.exists(document.querySelector("div.bb4 > div.bb4a")); ``` -You should place the new `div` elements in this order `.bb4a + .bb4b + .bb4c`. +Du solltest die neuen `div`-Elemente in dieser Reihenfolge platzieren `.bb4a + .bb4b + .bb4c`. ```js assert.exists(document.querySelector("div.bb4a + div.bb4b")); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9907.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9907.md index ab306d762a1..db71d18e70c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9907.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9907.md @@ -11,37 +11,37 @@ Give the new `div` elements these `width` and `height` values: `3%` and `10%` to # --hints-- -You should give `.bb4a` a `width` of `3%`. +Du solltest `.bb4a` eine `width` von `3%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4a")?.width, "3%"); ``` -You should give `.bb4a` a `height` of `10%`. +Du solltest `.bb4a` eine `height` von `10%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4a")?.height, "10%"); ``` -You should give `.bb4b` a `width` of `80%`. +Du solltest `.bb4b` eine `width` von `80%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4b")?.width, "80%"); ``` -You should give `.bb4b` a `height` of `5%`. +Du solltest `.bb4b` eine `height` von `5%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4b")?.height, "5%"); ``` -You should give `.bb4c` a `width` of `100%`. +Du solltest `.bb4c` eine `width` von `100%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4c")?.width, "100%"); ``` -You should give `.bb4c` a `height` of `85%`. +Du solltest `.bb4c` eine `height` von `85%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4c")?.height, "85%"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9908.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9908.md index 7c3190c3662..388aa98391f 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9908.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9908.md @@ -11,25 +11,25 @@ Remove the `background-color` property and value from `.bb4`, and add it to the # --hints-- -You should remove the `background-color` from `.bb4`. +Du solltest die `background-color` aus `.bb4` entfernen. ```js assert.isEmpty(new __helpers.CSSHelp(document).getStyle(".bb4")?.backgroundColor); ``` -You should give `.bb4a` a `background-color` of `--building-color4`. +Du solltest `.bb4a` eine `background-color` von `--building-color4` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4a")?.backgroundColor.trim(), "var(--building-color4)"); ``` -You should give `.bb4b` a `background-color` of `--building-color4`. +Du solltest `.bb4b` eine `background-color` von `--building-color4` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4b")?.backgroundColor.trim(), "var(--building-color4)"); ``` -You should give `.bb4c` a `background-color` of `--building-color4`. +Du solltest `.bb4c` eine `background-color` von `--building-color4` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".bb4c")?.backgroundColor.trim(), "var(--building-color4)"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9910.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9910.md index 2e5b99d2689..a1a7467d8dd 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9910.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9910.md @@ -7,7 +7,7 @@ dashedName: step-72 # --description-- -Add the new `window-wrap` class to the `.bb4c` element. +Füge die neue `window-wrap`-Klasse zum `.bb4c`-Element hinzu. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9911.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9911.md index 2892b75bceb..119a852b669 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9911.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9911.md @@ -7,17 +7,17 @@ dashedName: step-73 # --description-- -Looks good! On to the foreground buildings! Turn the `.fb1` building into three sections by nesting three new `div` elements within it. Give them the classes of `fb1a`, `fb1b` and `fb1c`, in that order. +Sieht gut aus! On to the foreground buildings! Turn the `.fb1` building into three sections by nesting three new `div` elements within it. Gib ihnen in dieser Reihenfolge die Klassen `fb1a`, `fb1b` und `fb1c`. # --hints-- -You should add three `div` elements within `.fb1`. +Du solltest drei `div`-Elemente innerhalb von `.fb1` hinzufügen. ```js assert.equal(document.querySelector("div.fb1")?.children?.length, 3); ``` -You should give the first new `div` a class of `fb1a`. +Du solltest dem ersten neuen `div` eine Klasse von `fb1a` zuweisen. ```js assert.exists(document.querySelector("div.fb1 > div.fb1a")); @@ -35,7 +35,7 @@ You should give the third new `div` a class of `fb1c`. assert.exists(document.querySelector("div.fb1 > div.fb1c")); ``` -You should place the new `div` elements in this order `.fb1a + .fb1b + .fb1c`. +Du solltest die neuen `div`-Elemente in dieser Reihenfolge platzieren: `.fb1a + .fb1b + .fb1c`. ```js assert.exists(document.querySelector("div.fb1a + div.fb1b")); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9912.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9912.md index f5277507c7a..e3b7959197d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9912.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9912.md @@ -7,7 +7,7 @@ dashedName: step-74 # --description-- -Give `.fb1b` a `width` of `60%` and `height` of `10%`, and `.fb1c` a `width` of `100%` and `height` of `80%`. +Gib `.fb1b` eine `width` von `60%` und `height` von `10%`, und `.fb1c` eine `width` von `100%` und `height` von `80%`. # --hints-- @@ -23,13 +23,13 @@ Du solltest `.fb1b` eine `height` von `10%` geben. assert.equal(new __helpers.CSSHelp(document).getStyle(".fb1b")?.height, "10%"); ``` -You should give `.fb1c` a `width` of `100%`. +Du solltest `.fb1c` eine `width` von `100%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb1c")?.width, "100%"); ``` -You should give `.fb1c` a `height` of `80%`. +Du solltest `.fb1c` eine `height` von `80%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb1c")?.height, "80%"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9913.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9913.md index 73c5cfd8b31..04331c946cc 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9913.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9913.md @@ -7,7 +7,7 @@ dashedName: step-75 # --description-- -Add the `building-wrap` class to the `.fb1` element to center the sections. +Füge die `building-wrap`-Klasse zum `.fb1`-Element hinzu, um die Abschnitte zu zentrieren. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9914.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9914.md index e80cba88fbe..7edf4181e9d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9914.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9914.md @@ -7,17 +7,17 @@ dashedName: step-76 # --description-- -Move the `background-color` property and value from `.fb1` to `.fb1b`. +Verschiebe die `background-color`-Eigenschaft und den Wert von `.fb1` nach `.fb1b`. # --hints-- -You should remove `background-color` from `.fb1`. +Du solltest `background-color` aus `.fb1` entfernen. ```js assert.isEmpty(new __helpers.CSSHelp(document).getStyle(".fb1")?.backgroundColor); ``` -You should add a `background-color` of `--building-color4` to `.fb1b`. +Du solltest eine `background-color` von `--building-color4` zu `.fb1b` hinzufügen. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb1b")?.backgroundColor.trim(), "var(--building-color4)"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9915.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9915.md index 7cddafd3bed..4242e06c678 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9915.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9915.md @@ -11,7 +11,7 @@ You don't need the `background-color` for this building anymore so you can remov # --hints-- -You should remove the `background-color` of `.fb5`. +Du solltest die `background-color` von `.fb5` entfernen. ```js assert.notMatch(code, /\.fb5\s*\{\s*[^}]*?background-color[^}]*?\}/); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9916.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9916.md index 2aba286791d..5eb9631099d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9916.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9916.md @@ -13,7 +13,7 @@ Add a `repeating-linear-gradient` to `.fb1c` with a `90deg` angle, your `--build # --hints-- -You should give `.fb1c` a `background` with a `repeating-linear-gradient`. +Du solltest `.fb1c` einen `background` mit einem `repeating-linear-gradient` geben. ```js assert.include(new __helpers.CSSHelp(document).getStyle(".fb1c")?.background, "repeating-linear-gradient"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9917.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9917.md index fa58e613b76..41394984a45 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9917.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9917.md @@ -7,7 +7,7 @@ dashedName: step-78 # --description-- -You can add multiple gradients to an element by separating them with a comma (`,`) like this: +Du kannst einem Element mehrere Farbverläufe hinzufügen, indem du sie wie folgt durch ein Komma (`,`) trennst: ```css gradient1( @@ -22,7 +22,7 @@ Add a `repeating-linear-gradient` to `.fb1c` below the one that's there; use you # --hints-- -You should not alter the first `repeating-linear-gradient`. +Du solltest den ersten `repeating-linear-gradient` nicht verändern. ```js assert.match(new __helpers.CSSHelp(document).getStyle(".fb1c")?.getPropVal('background', true), /repeating-linear-gradient\(90deg,var\(--building-color4\)(0%)?,var\(--building-color4\)10%,transparent10%,transparent15%\)/); @@ -34,7 +34,7 @@ You should add a `repeating-linear-gradient` with a first color of `--building-c assert.match(new __helpers.CSSHelp(document).getStyle(".fb1c")?.getPropVal('background', true), /repeating-linear-gradient\(90deg,var\(--building-color4\)(0%)?,var\(--building-color4\)10%,transparent10%,transparent15%\),repeating-linear-gradient\(var(\(--building-color4\)(0%)?,var\(--building-color4\)10%|\(--building-color4\)0%10%)/); ``` -You should use a second color of `--window-color4` from `10%` to `90%`. +Du solltest eine zweite Farbe von `--window-color4` von `10%` bis `90%` verwenden. ```js assert.match(new __helpers.CSSHelp(document).getStyle(".fb1c")?.getPropVal('background', true), /,(var\(--window-color4\)10%,var\(--window-color4\)90%\)|var\(--window-color4\)10%90%\))$/); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9918.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9918.md index b89733e8643..fcc09f27930 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9918.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9918.md @@ -7,17 +7,17 @@ dashedName: step-79 # --description-- -You're going to use some more border tricks for the top section. Add a `border-bottom` with a value of `7vh solid var(--building-color4)` to `.fb1a`. This will put a `7vh` height border on the bottom. But since the element has zero size, it only shows up as a 2px wide line from the 1px border that is on all the elements. +You're going to use some more border tricks for the top section. Füge `border-bottom` mit einem Wert von `7vh solid var(--building-color4)` zu `.fb1a` hinzu. Dadurch wird unten ein Rand mit einer Höhe von `7vh` angezeigt. But since the element has zero size, it only shows up as a 2px wide line from the 1px border that is on all the elements. # --hints-- -You should give `.fb1a` a `border-bottom`. +Du solltest `.fb1a` einen `border-bottom` geben. ```js assert.isNotEmpty(new __helpers.CSSHelp(document).getStyle(".fb1a")?.borderBottom); ``` -You should use a `border-bottom` of `7vh solid var(--building-color4)`. +Du solltest einen `border-bottom` von `7vh solid var(--building-color4)` verwenden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb1a")?.borderBottom.trim(), "7vh solid var(--building-color4)"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9919.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9919.md index 193557f49b9..934edd3554c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9919.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9919.md @@ -11,7 +11,7 @@ When you increase the size of the left and right borders, the border on the bott # --hints-- -You should give `.fb1a` a `border-left` of `2vw solid transparent`. +Du solltest `.fb1a` einen `border-left` von `2vw solid transparent` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb1a")?.borderLeft, "2vw solid transparent"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9920.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9920.md index 389c96ab5e2..e5096bcded3 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9920.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9920.md @@ -11,19 +11,19 @@ For `.fb2a`, add a `border-bottom` of `10vh solid var(--building-color3)`, and a # --hints-- -You should give `.fb2a` a `border-bottom` of `10vh solid var(--building-color3)`. +Du solltest `.fb2a` einen `border-bottom` von `10vh solid var(--building-color3)` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb2a")?.borderBottom.trim(), "10vh solid var(--building-color3)"); ``` -You should give `.fb2a` a `border-left` of `1vw solid transparent`. +Du solltest `.fb2a` einen `border-left` von `1vw solid transparent` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb2a")?.borderLeft, "1vw solid transparent"); ``` -You should give `.fb2a` a `border-right` of `1vw solid transparent`. +Du solltest `.fb2a` einen `border-right` von `1vw solid transparent` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb2a")?.borderRight, "1vw solid transparent"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9921.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9921.md index a754d57f729..ab93a29091e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9921.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9921.md @@ -11,31 +11,31 @@ For the next building, nest four `div` elements within `.fb3` with classes of `f # --hints-- -You should add four `div` elements within `.fb3`. +Du solltest vier `div`-Elemente innerhalb von `.fb3` hinzufügen. ```js assert.equal(document.querySelectorAll("div.fb3 > div")?.length, 4); ``` -You should give the first new `div` a class of `fb3a`. +Du solltest dem ersten neuen `div` eine Klasse von `fb3a` geben. ```js assert.equal(document.querySelector("div.fb3").firstElementChild, document.querySelector("div.fb3a")); ``` -You should give the second new `div` a class of `fb3b`. +Du solltest dem zweiten neuen `div` eine Klasse von `fb3b` geben. ```js assert.equal(document.querySelector("div.fb3 :nth-child(2)"), document.querySelector("div.fb3b")); ``` -You should give the third new `div` a class of `fb3a`. +Du solltest dem dritten neuen `div` eine Klasse von `fb3a` geben. ```js assert.equal(document.querySelector("div.fb3 :nth-child(3)"), document.querySelector("div.fb3b + div.fb3a")); ``` -You should give the fourth new `div` a class of `fb3b`. +Du solltest dem vierten neuen `div` eine Klasse von `fb3b` geben. ```js assert.exists(document.querySelector("div.fb3 :nth-child(4).fb3b")); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9922.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9922.md index 1d8b8e26ac9..bedd772afd9 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9922.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9922.md @@ -7,29 +7,29 @@ dashedName: step-89 # --description-- -Give the `.fb3a` element a `width` of `80%` and `height` of `15%`. Then give the `.fb3b` element a `width` of `100%` and `height` of `35%`. +Gib dem `.fb3a`-Element eine `width` von `80%` und `height` von `15%`. Gib dann dem `.fb3b`-Element eine `width` von `100%` und `height` von `35%`. # --hints-- -You should give `.fb3a` a `width` of `80%`. +Du solltest `.fb3a` eine `width` von `80%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb3a")?.width, "80%"); ``` -You should give `.fb3a` a `height` of `15%`. +Du solltest `.fb3a` eine `height` von `15%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb3a")?.height, "15%"); ``` -You should give `.fb3b` a `width` of `100%`. +Du solltest `.fb3b` eine `width` von `100%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb3b")?.width, "100%"); ``` -You should give `.fb3b` a `height` of `35%`. +Du solltest `.fb3b` eine `height` von `35%` geben. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(".fb3b")?.height, "35%"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9923.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9923.md index bc876c2ddb1..1b69a2a6f32 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9923.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9923.md @@ -11,7 +11,7 @@ Remove the `background-color` property and value from `.fb3`, and add them to `. # --hints-- -You should remove the `background-color` from `.fb3`. +Du solltest die `background-color` aus `.fb3` entfernen. ```js assert.isEmpty(new __helpers.CSSHelp(document).getStyle(".fb3")?.backgroundColor); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9925.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9925.md index a1cd637b36a..398a2b5ed4e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9925.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9925.md @@ -7,11 +7,11 @@ dashedName: step-92 # --description-- -Nest three new `div` elements in the first `.fb3a` element. Give them each a class of `fb3-window`. These will be windows for this section. +Nest three new `div` elements in the first `.fb3a` element. Give them each a class of `fb3-window`. Dies werden Fenster für diesen Abschnitt sein. # --hints-- -You should add three `div` elements within the first `.fb3a` element. +Du solltest drei `div`-Elemente innerhalb des ersten `.fb3a`-Elements hinzufügen. ```js assert.equal(document.querySelectorAll("div.fb3a > div")?.length, 3); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9926.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9926.md index 2eb1be39174..e6da0e75208 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9926.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9926.md @@ -7,7 +7,7 @@ dashedName: step-93 # --description-- -Give the `.fb3-window` elements a `width` of `25%`, a `height` of `80%`, and use your `--window-color1` variable as the `background-color` value. +Gib den `.fb3-window`-Elementen eine `width` von `25%`, eine `height` von `80%`, und nutze deine `--window-color1`-Variable für den `background-color`-Wert. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9929.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9929.md index e4605a77cfb..572d9948930 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9929.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e9929.md @@ -11,19 +11,19 @@ Only three more buildings to go. Nest two new `div` elements within the `.fb4` e # --hints-- -You should add two `div` elements within `.fb4`. +Du solltest zwei `div`-Elemente innerhalb von `.fb4` hinzufügen. ```js assert.equal(document.querySelectorAll("div.fb4 > div")?.length, 2); ``` -You should give the first new `div` a class of `fb4a`. +Du solltest dem ersten neuen `div` eine Klasse von `fb4a` geben. ```js assert.exists(document.querySelector("div.fb4a")); ``` -You should give the second new `div` a class of `fb4b`. +Du solltest dem zweiten neuen `div` eine Klasse von `fb4b` geben. ```js assert.exists(document.querySelector("div.fb4b")); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993d.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993d.md index 5211883b97f..e8fd37a921e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993d.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993d.md @@ -7,11 +7,11 @@ dashedName: step-117 # --description-- -Add a `:root` selector to the top of your media query. Then redefine all four of the `--building-color` variables to use the value `#000` there. +Füge oben in der Media Query einen `:root`-Selektor hinzu. Then redefine all four of the `--building-color` variables to use the value `#000` there. # --hints-- -You should add a `:root` selector to the media query. +Du solltest der Media Query einen `:root`-Selektor hinzufügen. ```js assert.notDeepEqual(new __helpers.CSSHelp(document).getRuleListsWithinMedia("(max-width: 1000px)")?.find(x=>x.selectorText === ":root"), undefined); @@ -23,19 +23,19 @@ You should add `--building-color1` with a value of `#000`. assert.equal(new __helpers.CSSHelp(document).getRuleListsWithinMedia("(max-width: 1000px)")?.find(x=>x.selectorText === ":root")?.style?.getPropertyValue("--building-color1")?.trim(), "#000"); ``` -You should add `--building-color2` with a value of `#000`. +Du solltest `--building-color2` mit einem Wert von `#000` hinzufügen. ```js assert.equal(new __helpers.CSSHelp(document).getRuleListsWithinMedia("(max-width: 1000px)")?.find(x=>x.selectorText === ":root")?.style?.getPropertyValue("--building-color2")?.trim(), "#000"); ``` -You should add `--building-color3` with a value of `#000`. +Du solltest `--building-color3` mit einem Wert von `#000` hinzufügen. ```js assert.equal(new __helpers.CSSHelp(document).getRuleListsWithinMedia("(max-width: 1000px)")?.find(x=>x.selectorText === ":root")?.style?.getPropertyValue("--building-color3")?.trim(), "#000"); ``` -You should add `--building-color4` with a value of `#000`. +Du solltest `--building-color4` mit einem Wert von `#000` hinzufügen. ```js assert.equal(new __helpers.CSSHelp(document).getRuleListsWithinMedia("(max-width: 1000px)")?.find(x=>x.selectorText === ":root")?.style?.getPropertyValue("--building-color4")?.trim(), "#000"); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993e.md index 945e7aeb439..4a37c96efdc 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993e.md @@ -9,7 +9,7 @@ dashedName: step-118 Lastly, in the `:root` selector of the media query, redefine all four of the `--window-color` variables to use `#777`. When you're done, resize the window and watch it go from day to night. -Variables are primarily used with colors, and that's how you used them here. But they can be given any value and used on any property. Your project looks great! +Variables are primarily used with colors, and that's how you used them here. But they can be given any value and used on any property. Dein Projekt sieht großartig aus! # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 44e49267cd2..b6e02c81583 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 The `rem` unit stands for `root em`, and is relative to the font size of the `html` element. -Create an `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md index 3deb8104aaf..4d78ce1e4d8 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md @@ -11,13 +11,13 @@ dashedName: assignment-with-a-returned-value Se ricordi la nostra discussione su <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank" rel="noopener noreferrer nofollow">Memorizzare valori con l'operatore di assegnazione</a>, l'espressione a destra del segno uguale viene risolta prima che il valore venga assegnato. Questo significa che possiamo prendere il valore restituito da una funzione e assegnarlo a una variabile. -Assume we have defined a function `sum` which adds two numbers together. +Supponiamo di avere definito una funzione `sum` che somma due numeri. ```js ourSum = sum(5, 12); ``` -Calling the `sum` function with the arguments of `5` and `12` produces a return value of `17`. This return value is assigned to the `ourSum` variable. +Chiamare la funzione `sum` con gli argomenti `5` e `12` produce un valore di ritorno di `17`. Questo valore di ritorno è assegnato alla variabile `ourSum`. # --instructions-- diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index a2354436f20..b292e1612db 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ Le virgolette non sono gli unici caratteri dei quali si può fare l'<dfn>escapin Assegna le seguenti tre righe di testo in una sola variabile `myStr` usando le sequenze di escape. -<blockquote>FirstLine<br>    \SecondLine<br>ThirdLine</blockquote> +<pre> +FirstLine +    \SecondLine +ThirdLine +</pre> Dovrai usare le sequenze di escape per inserire i caratteri speciali correttamente. Dovrai seguire anche la spaziatura come sopra, senza spazi tra sequenze di escape o le parole. diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index 78f4e0690c4..7bf06cbf93f 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -60,43 +60,43 @@ Dovresti avere almeno quattro istruzioni `break` assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` dovrebbe essere la stringa `Marley` +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` dovrebbe essere la stringa `The Answer` +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` dovrebbe essere la stringa `There is no #1` +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)` dovrebbe essere la stringa `Missed me by this much!` +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` dovrebbe essere la stringa `Ate Nine` +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` dovrebbe essere `""` (stringa vuota) +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` dovrebbe essere `""` (stringa vuota) +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index 9e173305e91..06c3281ef69 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index 1063093369a..95db23d9520 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -Dal momento che tutte le istanze hanno automaticamente le proprietà del `prototype`, pensa a un `prototype` come una "ricetta" per creare oggetti. Nota che il `prototype` per `duck` e per `canary` fa parte del costruttore `Bird` come `Bird.prototype`. Quasi ogni oggetto in JavaScript ha una proprietà `prototype` che fa parte della funzione costruttore che lo ha creato. +Dal momento che tutte le istanze hanno automaticamente le proprietà del `prototype`, pensa a un `prototype` come una "ricetta" per creare oggetti. Nota che il `prototype` per `duck` e per `canary` fa parte del costruttore `Bird` come `Bird.prototype`. # --instructions-- diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/italian/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index 04431694ac0..c43b4ef2176 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -Crea uno schema persona chiamato `personSchema` con questo prototipo: +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` Utilizzare i tipi di schema base di Mongoose. Se vuoi puoi anche aggiungere più campi, utilizzare semplici validatori come required o unique, e impostare dei valori predefiniti. Vedi il nostro <a href="https://www.freecodecamp.org/news/introduction-to-mongoose-for-mongodb-d2a7aa593c57/" target="_blank" rel="noopener noreferrer nofollow">articolo su Mongoose</a>. -Ora, crea un modello chiamato `Person` da `personSchema`. +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 9c54ecb2255..bb7ad8d7193 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 L'unità `rem` sta per `root em` ed è relativa alla dimensione del carattere dell'elemento `html`. -Crea un selettore `.small-text` e imposta la proprietà `font-size` a `0.85rem`, approssimativamente equivalenti a `13.6px` (ricorda che hai dato al tuo `html` una proprietà `font-size` di `16px`). +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md index 7af1ecdb62b..57b4cc14f70 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md @@ -7,140 +7,140 @@ dashedName: step-1 # --description-- -JavaScript is a powerful language which allows you to build websites that are interactive. +JavaScript è un linguaggio molto potente che ti permette di realizzare siti web interattivi. -To get started, create your standard HTML boilerplate with a `DOCTYPE`, `html`, `head`, and `body`, then add a `meta` tag for the `charset`. Add a `title` element and use the text `RPG - Dragon Repeller` for it. Include a `link` tag for your stylesheet to link the `styles.css` file. +Per iniziare crea il tuo boilerplate HTML standard con `DOCTYPE`, `html`, `head` e `body`, poi aggiungi un tag `meta` per il `charset`. Aggiungi un elemento `title` usando il testo `RPG - Dragon Repeller`. Includi un tag `link` per il foglio di stile per collegare il file `styles.css`. -Finally, create a `div` element with `id` set to `game` within your `body`. +Infine crea un elemento `div` con l'`id` impostato su `game` all'interno del `body`. # --hints-- -Your code should contain the `DOCTYPE` reference. +Il codice dovrebbe contenere il riferimento `DOCTYPE`. ```js assert(code.match(/<!DOCTYPE/gi)); ``` -You should include a space after the `DOCTYPE` reference. +Dovresti includere uno spazio dopo il riferimento `DOCTYPE`. ```js assert(code.match(/<!DOCTYPE\s+/gi)); ``` -You should define the document type to be `html`. +Dovresti definire il tipo di documento come `html`. ```js assert(code.match(/<!DOCTYPE\s+html/gi)); ``` -You should close the `DOCTYPE` declaration with a `>` after the type. +Dovresti chiudere la dichiarazione `DOCTYPE` con un carattere `>`. ```js assert(code.match(/<!DOCTYPE\s+html\s*>/gi)); ``` -Your `html` element should have an opening tag. Don't forget the `lang` attribute. +L'elemento `html` dovrebbe avere un tag di apertura. Non dimenticare l'attributo `lang`. ```js assert(code.match(/<html\s+lang\s*=\s*('|")en\1\s*>/gi)); ``` -Your `html` element should have a closing tag. +L'elemento `html` dovrebbe avere un tag di chiusura. ```js assert(code.match(/<\/html\s*>/)); ``` -Your `DOCTYPE` declaration should be at the beginning of your HTML. +La dichiarazione `DOCTYPE` dovrebbe essere all'inizio dell'HTML. ```js assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i)); ``` -You should have an opening `head` tag. +Dovresti avere un tag `head` di apertura. ```js assert(code.match(/<head\s*>/i)); ``` -You should have a closing `head` tag. +Dovresti avere un tag `head` di chiusura. ```js assert(code.match(/<\/head\s*>/i)); ``` -You should have an opening `body` tag. +Dovresti avere un tag `body` di apertura. ```js assert(code.match(/<body\s*>/i)); ``` -You should have a closing `body` tag. +Dovresti avere un tag `body` di chiusura. ```js assert(code.match(/<\/body\s*>/i)); ``` -The `head` and `body` elements should be siblings. +Gli elementi `head` e `body` dovrebbero essere fratelli. ```js assert(document.querySelector('head')?.nextElementSibling?.localName === 'body'); ``` -The `head` element should be within the `html` element. +L'elemento `head` dovrebbe essere dentro l'elemento `html`. ```js assert([...document.querySelector('html')?.children].some(x => x?.localName === 'head')); ``` -The `body` element should be within the `html` element. +L'elemento `body` dovrebbe essere dentro l''elemento `html`. ```js assert([...document.querySelector('html')?.children].some(x => x?.localName === 'body')); ``` -Your code should have a `meta` element. +Il codice dovrebbe avere un elemento `meta`. ```js const meta = document.querySelector('meta'); assert.exists(meta); ``` -Your `meta` element should have a `charset` attribute with the value `UTF-8`. +L'elemento `meta` dovrebbe avere un attributo `charset` con il valore `UTF-8`. ```js assert.match(code, /<meta[\s\S]+?charset=('|"|`)UTF-8\1/i) ``` -Your code should have a `title` element. +Il codice dovrebbe avere un elemento `title`. ```js const title = document.querySelector('title'); assert.exists(title); ``` -Your code should have a `link` element. +Il codice dovrebbe avere un elemento `link`. ```js const link = document.querySelector('head > link'); assert.exists(link); ``` -You should have a `div` element. +Dovresti avere un elemento `div`. ```js const div = document.querySelector('div'); assert.exists(div); ``` -Your `div` element should have an `id` attribute with the value `game`. +L'elemento `div` dovrebbe avere un attributo `id` con il valore `game`. ```js const div = document.querySelector('div'); assert.equal(div?.id, 'game'); ``` -Your `div` element should be within the `body` element. +L'elemento `div` dovrebbe trovarsi all'interno dell'elemento `body`. ```js const div = document.querySelector('div'); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md index 06fe79f6998..e867d2ba141 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md @@ -7,7 +7,7 @@ dashedName: step-10 # --description-- -Assegna a `#game` una larghezza massima di `500px` e un'altezza massima di `400px`. Imposta `background-color` su `lightgray` e `color` su `white`. Use margins to center it by setting the top and bottom margin to `0`, and the left and right margin to `auto`. Finally, give it `10px` of padding on all four sides. +Assegna a `#game` una larghezza massima di `500px` e un'altezza massima di `400px`. Imposta `background-color` su `lightgray` e `color` su `white`. Usa i margini per centrarlo impostando il margine superiore e inferiore a `0` e il margine sinistro e destro su `auto`. Infine, dagli `10px` di padding su tutti e quattro i lati. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md index 80c873470ea..c4001e6c9c8 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md @@ -7,7 +7,7 @@ dashedName: step-13 # --description-- -For now, hide your `#monsterStats` element with the `display` property. Non cambiare nessuno degli altri stili. +Per ora, nascondi l'elemento `#monsterStats` con la proprietà `display`. Non cambiare nessuno degli altri stili. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index 10416285c85..f11b630e670 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -7,7 +7,7 @@ dashedName: step-16 # --description-- -Uno degli strumenti più potenti è la tua console per sviluppatori. A seconda del browser, potrebbe aprirsi premendo `F12` o `Ctrl+Shift+I`. On Mac, you can press `Option + ⌘ + C` and select "Console". Puoi anche cliccare sul pulsante "Console" sopra la finestra di anteprima per vedere la nostra console integrata. +Uno degli strumenti più potenti è la tua console per sviluppatori. A seconda del browser, potrebbe aprirsi premendo `F12` o `Ctrl+Shift+I`. Su Mac puoi premere `Option + ⌘ + C` e selezionare "Console". Puoi anche cliccare sul pulsante "Console" sopra la finestra di anteprima per vedere la nostra console integrata. La console per sviluppatori include gli errori generati dal tuo codice, ma puoi anche usarla per vedere i valori delle variabili nel codice, che è molto utile per il debugging. diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md index 9a7aaeaf830..1d2a9452c77 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md @@ -7,19 +7,19 @@ dashedName: step-17 # --description-- -Before you start writing your project code, you should move it to its own file to keep things organized. +Prima di iniziare a scrivere il tuo progetto, dovresti spostarti su un file separato per mantenere le cose organizzate. -Remove your `console.log("Hello World");` line. Then give your now empty `script` element a `src` attribute set to `./script.js`. +Rimuovi la riga `console.log("Hello World");`. Poi dai all'elemento `script` vuoto un attributo `src` impostato su `./script.js`. # --hints-- -You should not have a `console.log("Hello World");` line in your code. +Non dovresti avere la riga `console.log("Hello World");` nel tuo codice. ```js assert.notMatch(code, /console\.log\("Hello World"\);/); ``` -Your `script` element should have a `src` attribute set to `./script.js`. +L'elemento `script` dovrebbe avere un attributo `src` impostato su `./script.js`. ```js const script = document.querySelector("script[data-src$='script.js']"); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md index 57635e7a002..1d296d52218 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md @@ -13,19 +13,19 @@ Alle variabili può essere <dfn>assegnato</dfn> un valore. Se lo fai quando le d var camperbot = "Bot"; ``` -This would initialize the `camperbot` variable with a value of `Bot`, a string. +Questo codice inizializza la variabile `camperbot` con il valore `Bot`, una stringa. -Initialize your `xp` variable to have a value of `0`, a number. +Inizializza la variabile `xp` con il valore `0`, un numero. # --hints-- -`xp` should have a value of `0`. +`xp` dovrebbe avere il valore `0`. ```js assert.equal(xp, 0); ``` -You should initialize the `xp` variable to `0`. Don't forget the semi-colon at the end of the line. +Dovresti inizializzare la variabile `xp` a `0`. Non dimenticare il punto e virgola alla fine della riga. ```js assert.match(code, /var\s+xp\s*=\s*0\s*;/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md index 06456dbf5cd..1d2422ee613 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md @@ -15,41 +15,41 @@ let order = ["first", "second", "third"]; Questo è un array che contiene tre valori. Nota che i valori sono separati da una virgola. -Change your `inventory` variable to be an array with the strings `stick`, `dagger`, and `sword`. +Cambia la variabile `inventory` in modo che sia un array con le stringhe `stick`, `dagger` e `sword`. # --hints-- -Your `inventory` variable should be an array. +La variabile `inventory` dovrebbe essere un array. ```js assert.isArray(inventory); ``` -Your `inventory` variable should have three values. +La variabile `inventory` dovrebbe contenere tre valori. ```js assert.lengthOf(inventory, 3); ``` -Your `inventory` variable should include the string `stick`. +La variabile `inventory` dovrebbe includere la stringa `stick`. ```js assert.include(inventory, "stick"); ``` -Your `inventory` variable should include the string `dagger`. +La variabile `inventory` dovrebbe includere la stringa `dagger`. ```js assert.include(inventory, "dagger"); ``` -Your `inventory` variable should include the string `sword`. +La variabile `inventory` dovrebbe includere la stringa `sword`. ```js assert.include(inventory, "sword"); ``` -Your `inventory` variable should have the values in the correct order. +La variabile `inventory` dovrebbe avere i valori nell'ordine corretto. ```js assert.deepEqual(inventory, ["stick", "dagger", "sword"]); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md index 093b4c2d946..b16cdfb8631 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -JavaScript interagisce con l'HTML usando il <dfn>Document Object Model</dfn>, o DOM. Il DOM è un albero di oggetti che rappresenta l'HTML. You can access the HTML using the `document` object, which represents your entire HTML document. +JavaScript interagisce con l'HTML usando il <dfn>Document Object Model</dfn>, o DOM. Il DOM è un albero di oggetti che rappresenta l'HTML. Puoi accedere all'HTML usando l'oggetto `document`, che rappresenta l'intero documento HTML. Un modo per trovare elementi specifici nel tuo HTML è usare il metodo `querySelector()`. Il metodo `querySelector()` prende un selettore CSS come argomento e restituisce il primo elemento che corrisponde al selettore. Ad esempio, per trovare l'elemento `<h1>` nel tuo HTML, dovresti scrivere: @@ -15,25 +15,25 @@ Un modo per trovare elementi specifici nel tuo HTML è usare il metodo `querySel let h1 = document.querySelector("h1"); ``` -Note that `h1` is a string and matches the CSS selector you would use. +Nota che `h1` è una stringa che corrisponde al selettore CSS che useresti. -Create a `button1` variable and use `querySelector()` to assign it your element with the `id` of `button1`. Remember that CSS `id` selectors are prefixed with a `#`. +Crea una variabile `button1` e usa `querySelector()` per assegnarla all'elemento con l'`id` con il valore `button1`. Ricorda che i selettori CSS di `id` hanno il prefisso `#`. # --hints-- -You should use `let` to declare a `button1` variable. +Dovresti usare la parola chiave `let` per dichiarare la variabile `button1`. ```js assert.match(code, /let button1/); ``` -You should use `document.querySelector()`. +Dovresti usare `document.querySelector()`. ```js assert.match(code, /document\.querySelector/); ``` -You should use the `#button1` selector. +Dovresti usare un selettore`#button1`. ```js assert.match(code, /querySelector\(('|")#button1\1\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md index d9e669d07fb..5931764a1b7 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md @@ -9,7 +9,7 @@ dashedName: step-36 `button1` rappresenta il primo elemento `button`. Questi elementi possiedono una proprietà particolare chiamata `onclick`, che puoi usare per determinare cosa accade quando qualcuno clicca il pulsante. -You can access properties in JavaScript a couple of different ways. The first is with <dfn>dot notation</dfn>. Accessing the `onclick` property of a button would look like: +Puoi accedere alle proprietà in JavaScript in un paio di modi diversi. Il primo è con la <dfn>dot notation</dfn> (notazione con punto). Il modo per accedere alla proprietà `onclick` di un elemento button sarà: ```js button.onclick diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md index 837320ddb1a..568c5d52433 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md @@ -7,7 +7,7 @@ dashedName: step-43 # --description-- -Now, add a line that updates the text of `button2` to say `Buy weapon (30 gold)` and update the text of `button3` to say `Go to town square`. +Ora aggiungi una riga che aggiorna il testo di `button2` in `Buy weapon (30 gold)` e aggiorna il testo di `button3` in `Go to town square`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md index 68eca6d11ce..d437b7eeca3 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md @@ -7,79 +7,79 @@ dashedName: step-44 # --description-- -You will also need to update the functions that run when the buttons are clicked again. +Avrai anche bisogno di aggiornare le funzioni che vengono eseguite quando i pulsanti vengono cliccati di nuovo. -In your `goStore()` function, update the `onclick` property for each button to run `buyHealth`, `buyWeapon`, and `goTown`, respectively. +Nella funzione `goStore()`, aggiorna le proprietà `onclick` per ogni pulsante in modo che eseguano rispettivamente `buyHealth`, `buyWeapon` e `goTown`. # --hints-- -You should use dot notation to access the `onclick` property of `button1`. +Dovresti usare la dot notation per accedere alla proprietà `onclick` di `button1`. ```js assert.match(code, /button1\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button1`. +Non dovresti usare `let` o `const` per accedere alla proprietà `onclick` di `button1`. ```js assert.notMatch(code, /(let|const)\s+button1.onclick/); ``` -You should set the `onclick` property of `button1` to be `buyHealth`. +Dovresti impostare la proprietà `onclick` di `button1` con `buyHealth`. ```js assert.match(code, /button1\.onclick\s*=\s*buyHealth/); ``` -You should set the `onclick` property of `button1` in your `goStore` function. +Dovresti impostare la proprietà `onclick` di `button1` nella funzione `goStore`. ```js assert.match(goStore.toString(), /button1\.onclick\s*=\s*buyHealth/); ``` -You should use dot notation to access the `onclick` property of `button2`. +Dovresti usare la dot notation per accedere alla proprietà `onclick` di `button2`. ```js assert.match(code, /button2\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button2`. +Non dovresti usare `let` o `const` per accedere alla proprietà `onclick` di `button2`. ```js assert.notMatch(code, /(let|const)\s+button2.onclick/); ``` -You should set the `onclick` property of `button2` to be `buyWeapon`. +Dovresti impostare la proprietà `onclick` di `button2` con `buyWeapon`. ```js assert.match(code, /button2\.onclick\s*=\s*buyWeapon/); ``` -You should set the `onclick` property of `button2` in your `goStore` function. +Dovresti impostare la proprietà `onclick` di `button2` nella funzione `goStore`. ```js assert.match(goStore.toString(), /button2\.onclick\s*=\s*buyWeapon/); ``` -You should use dot notation to access the `onclick` property of `button3`. +Dovresti usare la dot notation per accedere alla proprietà `onclick` di `button3`. ```js assert.match(code, /button3\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button3`. +Non dovresti usare `let` o `const` per accedere alla proprietà `onclick` di `button3`. ```js assert.notMatch(code, /(let|const)\s+button3.onclick/); ``` -You should set the `onclick` property of `button3` to be `goTown`. +Dovresti impostare la proprietà `onclick` di `button3` con `goTown`. ```js assert.match(code, /button3\.onclick\s*=\s*goTown/); ``` -You should set the `onclick` property of `button3` in your `goStore` function. +Dovresti impostare la proprietà `onclick` di `button3` nella funzione `goStore`. ```js assert.match(goStore.toString(), /button3\.onclick\s*=\s*goTown/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md index 281fbaddbcb..723959e9a53 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md @@ -7,49 +7,49 @@ dashedName: step-48 # --description-- -In your `goTown` function, change your `button` elements' `innerText` properties to be `Go to store`, `Go to cave`, and `Fight dragon`. Aggiorna le proprietà `onclick` rispettivamente in `goStore`, `goCave` e `fightDragon`. +Nella funzione `goTown`, cambia le proprietà `innerText` degli elementi `button` in `Go to store`, `Go to cave` e `Fight dragon`. Aggiorna le proprietà `onclick` rispettivamente in `goStore`, `goCave` e `fightDragon`. -Finally, update your text's `innerText` property to be `You are in the town square. You see a sign that says Store.`. +Infine, aggiorna il testo della proprietà `innerText` in `You are in the town square. You see a sign that says Store.`. # --hints-- -You should set the `button1.innerText` property to be `Go to store` in your `goTown` function. +Dovresti impostare la proprietà `button1.innerText` su `Go to store` nella funzione `goTown`. ```js assert.match(goTown.toString(), /button1\.innerText\s*=\s*('|")Go to store\1/); ``` -You should set the `button2.innerText` property to be `Go to cave` in your `goTown` function. +Dovresti impostare la proprietà `button2.innerText` su `Go to cave` nella funzione `goTown`. ```js assert.match(goTown.toString(), /button2\.innerText\s*=\s*('|")Go to cave\1/); ``` -You should set the `button3.innerText` property to be `Fight dragon` in your `goTown` function. +Dovresti impostare la proprietà `button3.innerText` su `Fight dragon` nella funzione `goTown`. ```js assert.match(goTown.toString(), /button3\.innerText\s*=\s*('|")Fight dragon\1/); ``` -You should set the `button1.onclick` property to be `goStore` in your `goTown` function. +Dovresti impostare la proprietà `button1.onclick` su `goStore` nella funzione `goTown`. ```js assert.match(goTown.toString(), /button1\.onclick\s*=\s*goStore/); ``` -You should set the `button2.onclick` property to be `goCave` in your `goTown` function. +Dovresti impostare la proprietà `button2.onclick` su `goCave` nella funzione `goTown`. ```js assert.match(goTown.toString(), /button2\.onclick\s*=\s*goCave/); ``` -You should set the `button3.onclick` property to be `fightDragon` in your `goTown` function. +Dovresti impostare la proprietà `button3.onclick` su `fightDragon` nella funzione `goTown`. ```js assert.match(goTown.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -You should set the `text.innerText` property to be `You are in the town square. You see a sign that says Store.` in your `goTown` function. +Dovresti impostare la proprietà `text.innerText` su `You are in the town square. You see a sign that says Store.` nella funzione `goTown`. ```js assert.match(goTown.toString(), /text\.innerText\s*=\s*('|")You are in the town square. You see a sign that says Store\.\1/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md index 4d849236553..eead10227e5 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md @@ -11,17 +11,17 @@ In precedenza hai usato un array per memorizzare delle stringhe. Ma gli array po Gli oggetti sono indicati da parentesi graffe. Un oggetto vuoto ha questo aspetto `{}`. -Add an empty object to your `locations` array. +Aggiungi un oggetto vuoto all'array `locations`. # --hints-- -Your first value of `locations` should be an object. +Il primo valore di `locations` dovrebbe essere un oggetto. ```js assert.isObject(locations[0]); ``` -Your first value of `locations` should be an empty object. +Il primo valore di `locations` dovrebbe essere un oggetto vuoto. ```js assert.deepEqual(locations[0], {}); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md index 62e61da6368..5d58c415098 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md @@ -9,7 +9,7 @@ dashedName: step-54 Proprio come i valori degli array, le proprietà degli oggetti sono separate da una virgola. Aggiungi una virgola dopo la proprietà `name` e aggiungi una proprietà `button text` con il valore di un array vuoto. -Note that, because the property name has more than one word, you'll need to surround it in quotes. For example: +Nota che visto che il nome della proprietà ha più di una parola, dovrai racchiuderlo tra virgolette. Ad esempio: ```js { diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md index 485c1ef9a63..edb2552196e 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md @@ -9,7 +9,7 @@ dashedName: step-60 Invece di assegnare le proprietà `innerText` e `onclick` a specifiche stringhe e funzioni, la funzione `update` userà i dati dalla `location` che le viene passata. Prima di tutto, occorre passare i dati. -Inside the `goTown` function, call the `update` function. Here is an example of calling a function named `myFunction`: +Nella funzione `goTown`, chiama la funzione `update`. Ecco un esempio della chiamata della funzione `myFunction`: ```js myFunction(); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md index 13634ea1b03..c1969c3a204 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md @@ -7,7 +7,7 @@ dashedName: step-61 # --description-- -Ora devi passare l'argomento `location` nella chiamata `update`. Puoi passare degli argomenti includendoli tra le parentesi della chiamata della funzione. For example, calling `myFunction` with an `arg` argument would look like: +Ora devi passare l'argomento `location` nella chiamata `update`. Puoi passare degli argomenti includendoli tra le parentesi della chiamata della funzione. Ad esempio, puoi chiamare `myFunction` con l'argomento `arg` in questo modo: ```js myFunction(arg) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index da4852cc5ba..e7392ef052d 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -9,31 +9,31 @@ dashedName: step-62 L'array `locations` contiene due location: `town square` e `store`. Attualmente stai passando l'intero array nella funzione `update`. -Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +Passa soltanto il primo elemento dell'array `locations` aggiungendo `[0]` alla fine della variabile. Ad esempio: `myFunction(arg[0]);`. -This is called <dfn>bracket notation</dfn>. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. +Questa notazione è detta <dfn>notazione a parentesi</dfn>. I valori in un array sono accessibili tramite il loro indice. Gli indici sono valori numerici e partono da 0 - questo sistema è detto a base zero. `arg[0]` è il primo elemento nell'array `arg`. # --hints-- -You should use bracket notation with `locations`. +Dovresti usare la notazione a parentesi su `locations`. ```js assert.match(code, /locations\[/); ``` -You should access the first object in the `locations` array. Remember that arrays are zero-based. +Dovresti accedere al primo oggetto nell'array `locations`. Ricorda che gli array sono a base zero. ```js assert.match(code, /locations\[0\]/); ``` -You should pass the first object in the `locations` array into the `update` function. +Dovresti passare il primo oggetto nell'array `locations` alla funzione `update`. ```js assert.match(code, /update\(locations\[0\]\);/); ``` -This call should still be in your `goTown()` function. +Questa chiamata dovrebbe essere ancora nella funzione `goTown()`. ```js assert.match(goTown.toString(), /update\(locations\[0\]\);/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md index 1c6048abc24..7791b363188 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md @@ -7,19 +7,19 @@ dashedName: step-63 # --description-- -Now your `update` function needs to use the argument you pass into it. +Adesso la funzione `update` deve utilizzare gli argomenti che le vengono passati. -Inside the `update` function, change the value of the `button1.innerText` assignment to be `location["button text"]`. That way, you use bracket notation to get the `button text` property of the `location` object passed into the function. +All'interno della funzione `update`, cambia il valore dell'assegnazione di `button1.innerText` in `location["button text"]`. Questo codice fa uso della notazione a parentesi per ottenere la proprietà `button text` dell'oggetto `location` passato alla funzione. # --hints-- -Your `update` function should use bracket notation to get the `button text` property of the `location` object passed into the function. +La funzione `update` dovrebbe usare la notazione a parentesi per ottenere la proprietà `button text` dell'oggetto `location` passato alla funzione. ```js assert.match(update.toString(), /location[('|")button text\1]/); ``` -You should assign the value of the `button text` property of the `location` object to the `innerText` property of `button1`. +Dovresti assegnare il valore della proprietà `button text` dell'oggetto `location` alla proprietà `innerText` di `button1`. ```js assert.match(update.toString(), /button1\.innerText\s*=\s*location\[('|")button text\1\]/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index 2971b08aa59..8dd40a6260f 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -9,7 +9,7 @@ dashedName: step-67 Infine, aggiorna l'assegnazione di `text.innerText` in modo che sia uguale a `text` dall'oggetto `location`. Invece di usare la notazione a parentesi, usa la <dfn>dot notation</dfn>. -Here is an example of accessing the `name` property of an object called `person`: +Ecco un esempio di come accedere alla proprietà `name` di un oggetto chiamato `person`: ```js person.name diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md index 88decb83264..705ffa3186a 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md @@ -7,11 +7,11 @@ dashedName: step-75 # --description-- -Now that you are updating the `gold` and `health` variables, you need to display those new values on the game screen. +Ora che stai aggiornando le variabili `gold` e `health`, hai bisogno di mostrare i nuovi valori sullo schermo di gioco. -After your assignment lines, assign the `innerText` property of `goldText` to be the variable `gold`. Use the same pattern to update `healthText` with the `health` variable. +Dopo le righe di assegnazione, assegna la proprietà `innerText` di `goldText` in modo che sia la variabile `gold`. Usa lo stesso modello per aggiornare `healthText` con la variabile `health`. -Here is an example: +Ecco un esempio: ```js let value = 100; @@ -19,9 +19,9 @@ const total = document.querySelector('#total'); total.innerText = value; ``` -You can test this by clicking your "Go to store" button, followed by your "Buy Health" button. +Puoi fare un test cliccando il pulsante "Go to store", seguito dal pulsante "Buy Health". -**Note:** Your answer should only be two lines of code. +**Nota:** la tua risposta dovrebbe essere di sole due righe di codice. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md index 20ec1a5f812..a9b1cd0a271 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md @@ -7,7 +7,7 @@ dashedName: step-78 # --description-- -Now when a player tries to buy health, it will only work if they have enough money. In caso contrario, non accadrà nulla. Aggiungi un'istruzione `else` in cui poter inserire del codice da eseguire se un giocatore non ha abbastanza soldi. +Ora quando un giocatore cerca di comprare vita, potrà farlo solo se ha abbastanza soldi. In caso contrario, non accadrà nulla. Aggiungi un'istruzione `else` in cui poter inserire del codice da eseguire se un giocatore non ha abbastanza soldi. Ecco un esempio di un'istruzione `else` vuota: diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md index 4269155f247..e1f610496c7 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md @@ -9,7 +9,7 @@ dashedName: step-84 Il valore della variabile `currentWeapon` corrisponde a un indice nell'array `weapons`. Il giocatore inizia con `stick`, dal momento che `currentWeapon` inizia a `0` e `weapons[0]` è l'arma `stick`. -In the `buyWeapon` function, use compound assignment to add `1` to `currentWeapon` - the user is buying the next weapon in the `weapons` array. +Nella funzione `buyWeapon`, usa l'assegnazione composta per aggiungere `1` a `currentWeapon` - l'utente sta comprando l'arma successiva nell'array `weapons`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md index 299d0712f31..081f14099e3 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md @@ -7,7 +7,7 @@ dashedName: step-88 # --description-- -Use bracket notation to access an object within the `weapons` array and assign it to your `newWeapon` variable. Place the variable `currentWeapon` within the brackets. +Usa la notazione a parentesi per accedere a un oggetto all'interno dell'array `weapons` e assegnalo alla variabile `newWeapon`. Posiziona la variabile `currentWeapon` tra le parentesi. Quando usi una variabile in notazione a parentesi, stai consultando una proprietà o un indice in base al *valore* di quella variabile. diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md index 5b62881647c..1aad157db69 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md @@ -7,26 +7,26 @@ dashedName: step-92 # --description-- -Up until now, any time `text.innerText` was updated, the old text was erased. Stavolta, usa l'operatore `+=` per aggiungere il testo alla fine di `text.innerText`. +Finora, ogni volta che `text.innerText` è stato aggiornato, il vecchio testo è stato cancellato. Stavolta, usa l'operatore `+=` per aggiungere il testo alla fine di `text.innerText`. -Add the string `In your inventory you have:` - include the spaces at the beginning and the end. +Aggiungi la stringa `In your inventory you have:` - includi gli spazi all'inizio e alla fine. # --hints-- -You should add a new line with `text.innerText`. +Dovresti aggiungere una nuova riga con `text.innerText`. ```js const matches = buyWeapon.toString().match(/text\.innerText/g); assert.lengthOf(matches, 2); ``` -You should use the `+=` operator to add to `text.innerText`. +Dovresti usare l'operatore `+=` per aggiungere a `text.innerText`. ```js assert.match(buyWeapon.toString(), /text\.innerText\s*\+=\s*/) ``` -You should add the string `In your inventory you have:` to the end of `text.innerText`. Mind the spaces! +Dovresti aggiungere la stringa `In your inventory you have:` alla fine di `text.innerText`. Attento agli spazi! ```js assert.match(buyWeapon.toString(), /text\.innerText\s*\+=\s*('|")\sIn your inventory you have:\s\1/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md index 9f908d2db32..72c1b0927ef 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md @@ -9,17 +9,17 @@ dashedName: step-96 Gli array hanno una proprietà `length` che restituisce il numero di elementi nell'array. Potresti voler aggiungere nuovi valori all'array `weapons` in futuro. -Change your `if` condition to check if `currentWeapon` is less than the length of the `weapons` array. An example of checking the length of an array `myArray` would look like `myArray.length`. +Cambia la condizione `if` in modo che verifichi se `currentWeapon` è minore della lunghezza dell'array `weapons`. Un esempio di verifica della lunghezza dell'array `myArray` è `myArray.length`. # --hints-- -You should use the `length` property on the `weapons` array. +Dovresti usare la proprietà `length` sull'array `weapons`. ```js assert.match(buyWeapon.toString(), /weapons\.length/); ``` -Your `if` statement should check if `currentWeapon` is less than `weapons.length`. +L'istruzione `if` dovrebbe verificare se `currentWeapon` è minore di `weapons.length`. ```js assert.match(buyWeapon.toString(), /currentWeapon\s*<\s*weapons\.length/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md index be15b135728..0ff972d9d01 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md @@ -9,17 +9,17 @@ dashedName: step-97 Ora hai un errore da correggere. La variabile `currentWeapon` è l'indice dell'array `weapons`, ma la numerazione degli array parte da zero. L'indice dell'ultimo elemento in un array è inferiore della lunghezza dell'array di uno. -Change the `if` condition to check `weapons.length - 1`, instead of `weapons.length`. +Cambia la condizione `if` per verificare `weapons.length - 1`, invece di `weapons.length`. # --hints-- -You should update the condition to subtract `1` from `weapons.length`. +Dovresti aggiornare la condizione sottraendo `1` da `weapons.length`. ```js assert.match(buyWeapon.toString(), /weapons\.length\s*-\s*1/); ``` -Your condition should check if `currentWeapon` is less than `weapons.length - 1`. +La condizione dovrebbe verificare se `currentWeapon` è minore di `weapons.length - 1`. ```js assert.match(buyWeapon.toString(), /currentWeapon\s*<\s*weapons\.length\s*-\s*1/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md index 67870fb094a..25818d11074 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md @@ -7,31 +7,31 @@ dashedName: step-99 # --description-- -Once a player has the most powerful weapon, you can give them the ability to sell their old weapons. +Una volta che un giocatore ha l'arma più potente, puoi dargli la possibilità di vendere le sue vecchie armi. -In the outer `else` statement, set `button2.innerText` to `Sell weapon for 15 gold`. Also set `button2.onclick` to the function name `sellWeapon`. +Nell'istruzione `else` esterna, imposta `button2.innerText` su `Sell weapon for 15 gold`. Inoltre, imposta `button2.onclick` sul nome della funzione `sellWeapon`. # --hints-- -You should set the value of `button2.innerText`. +Dovresti impostare il valore di `button2.innerText`. ```js assert.match(buyWeapon.toString(), /button2\.innerText/); ``` -You should set the value of `button2.innerText` to `Sell weapon for 15 gold`. +Dovresti impostare il valore di `button2.innerText` su `Sell weapon for 15 gold`. ```js assert.match(buyWeapon.toString(), /button2\.innerText\s*=\s*('|")Sell weapon for 15 gold\1;/); ``` -You should set the value of `button2.onclick`. +Dovresti impostare il valore di `button2.onclick`. ```js assert.match(buyWeapon.toString(), /button2\.onclick/); ``` -You should set the value of `button2.onclick` to `sellWeapon`. +Dovresti impostare il valore di `button2.onclick` su `sellWeapon`. ```js assert.match(buyWeapon.toString(), /button2\.onclick\s*=\s*sellWeapon;/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md index abc36bf331d..912272ebbf9 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md @@ -7,7 +7,7 @@ dashedName: step-111 # --description-- -Seguendo lo stesso schema, usa il codice nelle funzioni `fightBeast` e `fightDragon`. Ricorda che `beast` è all'indice `1` e `dragon` è all'indice `2`. Also, remove the `console.log` call from your `fightDragon` function. +Seguendo lo stesso schema, usa il codice nelle funzioni `fightBeast` e `fightDragon`. Ricorda che `beast` è all'indice `1` e `dragon` è all'indice `2`. Inoltre, rimuovi la chiamata `console.log` dalla funzione `fightDragon`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md index b1723da1b0a..34675fb9990 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md @@ -7,7 +7,7 @@ dashedName: step-115 # --description-- -Sotto la chiamata di `update`, imposta `monsterHealth` in modo che sia la vita del mostro corrente. You can get this value by accessing the `health` property of `monsters[fighting]` with dot notation. +Sotto la chiamata di `update`, imposta `monsterHealth` in modo che sia la vita del mostro corrente. Puoi ottenere questo valore accedendo alla proprietà `health` di `monsters[fighting]` con la dot notation. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md index 84aa940e7e0..fd58757717a 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md @@ -7,7 +7,7 @@ dashedName: step-117 # --description-- -Now, set the `innerText` property of `monsterName` to be the `name` property of the current monster. Fai lo stesso per le proprietà `monsterHealthText` e `health`. +Ora imposta la proprietà `innerText` di `monsterName` in modo che sia la proprietà `name` del mostro attuale. Fai lo stesso per le proprietà `monsterHealthText` e `health`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md index 2d0f9a39d2c..659d8fe7533 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md @@ -11,7 +11,7 @@ JavaScript offre l'utilità integrata `Math` che possiede svariati strumenti mat Utilizzandoli, puoi generare un numero casuale all'interno di un intervallo. Ad esempio, questo genera un numero casuale tra 1 e 5: `Math.floor(Math.random() * 5) + 1;`. -Following this pattern, use the addition operator (`+`) to add a random number between `1` and the value of `xp` to your `monsterHealth` variable change. +Seguendo questo modello, usa l'operatore di addizione (`+`) per aggiungere un numero casuale tra `1` e il valore di `xp` al cambiamento della variabile `monsterHealth`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md index 81ada2618f1..32d17f79c38 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md @@ -7,43 +7,43 @@ dashedName: step-132 # --description-- -Your `locations` array doesn't have a fifth element, so `locations[4]` doesn't work. +L'array `locations` non possiede un quinto elemento, quindi `locations[4]` non funziona. -Add a new object at the end of the `locations` array, following the same structure as the other objects. Set `name` to `kill monster`, set `button text` to an array with three `Go to town square` strings, set `button functions` to an array with three `goTown` variables, and set `text` to `The monster screams Arg! as it dies. You gain experience points and find gold.`. +Aggiungi un nuovo oggetto alla fine dell'array `locations`, seguendo la stessa struttura degli altri oggetti. Imposta `name` su `kill monster`, imposta `button text` su un array con tre stringhe `Go to town square`, imposta `button functions` su un array con tre variabili `goTown`, e imposta `text` su `The monster screams Arg! as it dies. You gain experience points and find gold.`. # --hints-- -Your `locations` array should have five values. +L'array `locations` dovrebbe contenere cinque valori. ```js assert.lengthOf(locations, 5); ``` -Your fifth `locations` value should be an object. +Il quinto valore di `locations` dovrebbe essere un oggetto. ```js assert.isObject(locations[4]); ``` -Your fifth `locations` value should have a `name` property with the value `kill monster`. +Il quinto valore di `locations` dovrebbe avere una proprietà `name` con il valore `kill monster`. ```js assert.equal(locations[4].name, 'kill monster'); ``` -Your fifth `locations` value should have a `button text` array with three `Go to town square` strings. +Il quinto valore di `locations` dovrebbe avere un array `button text` con tre stringhe `Go to town square`. ```js assert.deepEqual(locations[4]["button text"], ['Go to town square', 'Go to town square', 'Go to town square']); ``` -Your fifth `locations` value should have a `button functions` array with three `goTown` variables. +Il quinto valore di `locations` dovrebbe avere un array `button functions` con tre variabili `goTown`. ```js assert.deepEqual(locations[4]["button functions"], [goTown, goTown, goTown]); ``` -Your fifth `locations` value should have a `text` property with the value `The monster screams Arg! as it dies. You gain experience points and find gold.`. +Il quinto valore di `locations` dovrebbe avere una proprietà `text` con il valore `The monster screams Arg! as it dies. You gain experience points and find gold.`. ```js assert.equal(locations[4].text, 'The monster screams Arg! as it dies. You gain experience points and find gold.'); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md index 5493d277c2b..0ee30279d64 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md @@ -9,17 +9,17 @@ dashedName: step-133 La parola `Arg!` dovrebbe avere delle virgolette intorno. Oltre all'escaping delle virgolette, c'è un altro modo per includere le virgolette all'interno di una stringa. -Change the double quotes around the string `The monster screams Arg! as it dies. You gain experience points and find gold.` to single quotes `'`, then add double quotes around `Arg!`. +Cambia le virgolette doppie attorno alla stringa `The monster screams Arg! as it dies. You gain experience points and find gold.` in virgolette singole `'`, poi aggiungi le virgolette doppie attorno ad `Arg!`. # --hints-- -You should use single quotes around the string. +Dovresti usare virgolette singole attorno alla stringa. ```js assert.match(code, /'The monster screams "?Arg!"? as it dies. You gain experience points and find gold.'/); ``` -You should use double quotes around `Arg!`. +Dovresti usare le virgolette doppie intorno ad `Arg!`. ```js assert.equal(locations[4].text, 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md index b52900db0ee..9d7cf30f6b8 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md @@ -7,25 +7,25 @@ dashedName: step-134 # --description-- -After a monster is defeated, the monster's stat box should no longer display. +Dopo che un mostro è stato sconfitto, la stat box del mostro non dovrebbe essere più visualizzata. -On the first line of the `update` function, use `monsterStats.style.display` to change the `display` value to `none`. +Nella prima riga della funzione `update`, usa `monsterStats.style.display` per cambiare il valore di `display` in `none`. # --hints-- -You should use `monsterStats.style.display` in the `update` function. +Dovresti usare `monsterStats.style.display` nella funzione `update`. ```js assert.match(update.toString(), /monsterStats\.style\.display/); ``` -You should set `monsterStats.style.display` to `none`. +Dovresti impostare `monsterStats.style.display` su `none`. ```js assert.match(update.toString(), /monsterStats\.style\.display\s*=\s*('|")none\1/); ``` -You should add your code in the first line of the `update` function. +Dovresti aggiungere il codice nella prima riga della funzione `update`. ```js assert.match(update.toString(), /update\s*\(\s*location\s*\)\s*\{\s*monsterStats\.style\.display\s*=\s*('|")none\1/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md index 988f76ac8e2..d8993f4e3ff 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md @@ -28,7 +28,7 @@ const block = attack.toString().split("else if"); assert.include(block[1], "if"); ``` -Your new `if` statement should check if `fighting` is strictly equal to `2`. +La nuova istruzione `if` dovrebbe verificare se `fighting` è strettamente uguale a `2`. ```js const block = attack.toString().split("else if"); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md index f31109776ee..2d7be19c063 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md @@ -7,7 +7,7 @@ dashedName: step-148 # --description-- -In your `attack` function, below the `health` variable, create an `if` statement. Imposta la condizione in modo che chiami la funzione `isMonsterHit`. +Nella funzione `attack`, sotto la variabile `health`, crea un'istruzione `if`. Imposta la condizione in modo che chiami la funzione `isMonsterHit`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md index 11493b6525d..a996e5d3233 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md @@ -7,7 +7,7 @@ dashedName: step-150 # --description-- -Add an `else` statement to the first `if` statement inside you `attack()` function. Nell'istruzione `else`, usa l'operatore `+=` per aggiungere il testo `You miss.` alla fine di `text.innerText`. +Aggiungi un'istruzione `else` alla prima istruzione `if` all'interno della funzione `attack()`. Nell'istruzione `else`, usa l'operatore `+=` per aggiungere il testo `You miss.` alla fine di `text.innerText`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md index e86eaa0c36d..a677c613333 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md @@ -7,11 +7,11 @@ dashedName: step-152 # --description-- -The player should hit if either `Math.random() > .2` **or** if the player's health is less than 20. +Il giocatore dovrebbe colpire se `Math.random() > .2` **o** se la vita del giocatore è minore di 20. -At the end of your `return` statement, use the <dfn>logical or</dfn> operator `||` and check if `health` is less than `20`. +Alla fine dell'istruzione `return`, usa l'operatore <dfn>logico or</dfn>, `||`, e verifica se `health` è minore di `20`. -The logical or operator will use the first value if it is truthy – that is, anything apart from `NaN`, `null`, `0`, `-0`, `0n`, `""`, and `false`. Otherwise, it will use the second value. +L'operatore logico or userà il primo valore nel caso sia truthy – ovvero qualsiasi cosa eccetto `NaN`, `null`, `0`, `-0`, `0n`, `""` e `false`. Altrimenti, userà il secondo valore. Ad esempio: `num < 10 || num > 20`. diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md index fce037f3ba1..9781548b804 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md @@ -9,17 +9,17 @@ dashedName: step-34 Infine, usa `querySelector()` per ottenere l'elemento `#monsterHealth`. Dato che hai già dichiarato la variabile `monsterHealth` precedentemente, devi dare un nome diverso alla variabile per questo elemento. -Declare a new variable with the `const` keyword and name it `monsterHealthText`. +Dichiara una nuova variabile con la parola chiave `const` e dalle il nome `monsterHealthText`. # --hints-- -You should declare a `monsterHealthText` variable with `const`. +Dovresti dichiarare una variabile `monsterHealthText` con `const`. ```js assert.match(code, /const monsterHealthText/); ``` -Your `monsterHealthText` variable should have the value of your `#monsterHealth` element. +La variabile `monsterHealthText` dovrebbe avere il valore dell'elemento `#monsterHealth`. ```js assert.deepEqual(monsterHealthText, document.querySelector('#monsterHealth')); diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index a7860613e00..d9a59ae9773 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ dashedName: escape-sequences-in-strings Assign the following three lines of text into the single variable `myStr` using escape sequences. -<blockquote>FirstLine<br>    \SecondLine<br>ThirdLine</blockquote> +<pre> +FirstLine +    \SecondLine +ThirdLine +</pre> You will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words. diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index 2559731f205..f95caeb1443 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -60,43 +60,43 @@ assert(!/if/g.test(code)); assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` は文字列 `Marley` になる必要があります。 +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` は文字列 `The Answer` になる必要があります。 +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` は文字列 `There is no #1` になる必要があります。 +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)` は文字列 `Missed me by this much!` になる必要があります。 +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` は文字列 `Ate Nine` になる必要があります。 +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` は `""` (空文字列) になる必要があります。 +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` は `""` (空文字列) になる必要があります。 +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index 2a61756fbab..690fc85aedd 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index 5d048b26def..c2698a20887 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -すべてのインスタンスは自動的に `prototype` にプロパティを持つので、`prototype` をオブジェクトを作成するための「レシピ」と捉えることができます。 ちなみに、`duck` と `canary` の `prototype` は、`Bird.prototype` として `Bird` のコンストラクターの一部となっています。 JavaScript のほぼすべてのオブジェクトは、それを作成したコンストラクター関数の一部である `prototype` プロパティを持っています。 +すべてのインスタンスは自動的に `prototype` にプロパティを持つので、`prototype` をオブジェクトを作成するための「レシピ」と捉えることができます。 ちなみに、`duck` と `canary` の `prototype` は、`Bird.prototype` として `Bird` のコンストラクターの一部となっています。 # --instructions-- diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index bc7a30b15fe..daa85f78417 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -次のプロトタイプを持つ `personSchema` というパーソンスキーマを作成してください。 +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` Mongoose の基本的なスキーマタイプを使用してください。 フィールドを追加したい場合は、required や unique といった単純なバリデーターを使用し、デフォルト値を設定してください。 <a href="https://www.freecodecamp.org/news/introduction-to-mongoose-for-mongodb-d2a7aa593c57/" target="_blank" rel="noopener noreferrer nofollow">Mongoose の記事</a>を参照してください。 -次に、`personSchema` から `Person` というモデルを作成してください。 +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 1b282626765..d450644aadb 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 `rem` という単位は `root em` を表し、`html` 要素のフォントサイズに比例します。 -Create an `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md index 487ff4ed417..fae27bb7b41 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md @@ -11,13 +11,13 @@ dashedName: assignment-with-a-returned-value Se você se lembrar de nossa discussão sobre como <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank" rel="noopener noreferrer nofollow">armazenar valores com o operador de atribuição</a>, tudo à direita do sinal de igual é resolvido antes de o valor ser atribuído. Isso significa que podemos pegar o valor de retorno de uma função e atribuí-lo a uma variável. -Assume we have defined a function `sum` which adds two numbers together. +Assuma que temos uma função definida chamada `sum`, que soma dois números. ```js ourSum = sum(5, 12); ``` -Calling the `sum` function with the arguments of `5` and `12` produces a return value of `17`. This return value is assigned to the `ourSum` variable. +Chamar a função `sum` com os argumentos `5` e `12` produz um valor de retorno de `17`. Esse valor de retorno é atribuído à variável `ourSum`. # --instructions-- diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index 58ad9590fc2..472ee81876b 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ Aspas não são os únicos caracteres que podem ser <dfn>escapados</dfn> dentro Atribua as três linhas de texto a seguir em uma única variável `myStr` usando sequências de escapamento. -<blockquote>FirstLine<br>    \SecondLine<br>ThirdLine</blockquote> +<pre> +FirstLine +    \SecondLine +ThirdLine +</pre> Você precisará usar sequências de escapamento para inserir corretamente os caracteres especiais. Você também precisará seguir os espaçamentos assim como acima, sem espaços entre sequências de escapamento ou palavras. diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index ea6de9e0177..b9f132674dc 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -60,43 +60,43 @@ Você deve ter pelo menos instruções `break` assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` deve ser a string `Marley` +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` deve ser a string `The Answer` +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` deve ser a string `There is no #1` +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)` deve ser a string `Missed me by this much!` +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` deve ser a string `Ate Nine` +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` deve ser `""` (string vazia) +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` deve ser `""` (string vazia) +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index 912f0c31949..1c310a7d4e6 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index 24dc9ec8df3..10992eaca0f 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -Já que todas as instâncias automaticamente possuem as propriedades no `prototype`, pense no `prototype` como uma "receita" para criar objetos. Note que o `prototype` para `duck` e `canary` faz parte do construtor de `Bird` como `Bird.prototype`. Quase todos objetos em JavaScript possuem a propriedade `prototype` o qual é parte da função construtora que o criou. +Já que todas as instâncias automaticamente possuem as propriedades no `prototype`, pense no `prototype` como uma "receita" para criar objetos. Note que o `prototype` para `duck` e `canary` faz parte do construtor de `Bird` como `Bird.prototype`. # --instructions-- diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index ac210838cba..9234f44036c 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -Crie um schema de pessoa chamado `personSchema` que tenha este protótipo: +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` Use os tipos de schemas básicos de Mongoose. Se você quiser, também pode adicionar mais campos, usar validadores simples, como required ou unique, e definir valores padrão. Veja nosso <a href="https://www.freecodecamp.org/news/introduction-to-mongoose-for-mongodb-d2a7aa593c57/" target="_blank" rel="noopener noreferrer nofollow">artigo sobre o Mongoose</a>. -Agora, crie um modelo chamado `Person` do `personSchema`. +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f805f813eaf2049bc2ceea.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f805f813eaf2049bc2ceea.md index ca4f69c22b9..655533518c7 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f805f813eaf2049bc2ceea.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f805f813eaf2049bc2ceea.md @@ -7,11 +7,11 @@ dashedName: step-17 # --description-- -Adicione um elemento `input` dentro do elemento `label`. Não se esqueça de adicionar os elementos `input` após o texto da `label` e de incluir um espaço após os dois-pontos. +Adicione um elemento `input` dentro de cada elemento `label`. Não se esqueça de adicionar cada elemento `input` após o texto da `label` e de incluir um espaço após os dois-pontos. # --hints-- -Você deve adicionar um elemento `input` ao elemento `fieldset`. +Você deve adicionar quatro elementos `input` ao elemento `fieldset`. ```js assert.equal(document.querySelectorAll('fieldset input')?.length, 4); diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 339b8980786..7236c760cf1 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 A unidade `rem` representa `root em` e é relativa ao tamanho da fonte do elemento `html`. -Crie um seletor `.small-text` e defina `font-size` como `0.85rem`, o que representaria aproximadamente `13.6px` (lembre-se de que você definiu o `html` como tendo um `font-size` de `16px`). +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md index 94ef46cda64..2a66238a913 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md @@ -7,140 +7,140 @@ dashedName: step-1 # --description-- -JavaScript is a powerful language which allows you to build websites that are interactive. +O JavaScript é uma linguagem poderosa, que permite que você construa sites que são interativos. -To get started, create your standard HTML boilerplate with a `DOCTYPE`, `html`, `head`, and `body`, then add a `meta` tag for the `charset`. Add a `title` element and use the text `RPG - Dragon Repeller` for it. Include a `link` tag for your stylesheet to link the `styles.css` file. +Para começar, crie seu boilerplate HTML padrão com um `DOCTYPE`, `html`, `head` e `body`. Em seguida, adicione uma tag `meta` para o `charset`. Adicione um elemento `title` e use o texto `RPG - Dragon Repeller` a ele. Inclua uma tag `link` para sua folha de estilos e vincule-a ao arquivo `styles.css`. -Finally, create a `div` element with `id` set to `game` within your `body`. +Por fim, crie um elemento `div` com o `id` definido como `game` dentro de `body`. # --hints-- -Your code should contain the `DOCTYPE` reference. +O código deve conter a referência `DOCTYPE`. ```js assert(code.match(/<!DOCTYPE/gi)); ``` -You should include a space after the `DOCTYPE` reference. +Você deve incluir um espaço após a referência `DOCTYPE`. ```js assert(code.match(/<!DOCTYPE\s+/gi)); ``` -You should define the document type to be `html`. +Você deve definir o tipo de documento para `html`. ```js assert(code.match(/<!DOCTYPE\s+html/gi)); ``` -You should close the `DOCTYPE` declaration with a `>` after the type. +Você deve fechar a declaração `DOCTYPE` com um `>` após o tipo. ```js assert(code.match(/<!DOCTYPE\s+html\s*>/gi)); ``` -Your `html` element should have an opening tag. Don't forget the `lang` attribute. +O elemento `html` deve ter uma tag de abertura. Não se esqueça do atributo `lang`. ```js assert(code.match(/<html\s+lang\s*=\s*('|")en\1\s*>/gi)); ``` -Your `html` element should have a closing tag. +O elemento `html` deve ter uma tag de fechamento. ```js assert(code.match(/<\/html\s*>/)); ``` -Your `DOCTYPE` declaration should be at the beginning of your HTML. +A declaração `DOCTYPE` deve ser no início do HTML. ```js assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i)); ``` -You should have an opening `head` tag. +Você deve acrescentar uma tag de abertura `head`. ```js assert(code.match(/<head\s*>/i)); ``` -You should have a closing `head` tag. +Você deve ter uma tag de fechamento para `head`. ```js assert(code.match(/<\/head\s*>/i)); ``` -You should have an opening `body` tag. +Você deve ter uma tag de abertura para `body`. ```js assert(code.match(/<body\s*>/i)); ``` -You should have a closing `body` tag. +Você deve ter uma tag de fechamento para `body`. ```js assert(code.match(/<\/body\s*>/i)); ``` -The `head` and `body` elements should be siblings. +Os elementos `head` e `body` devem ser irmãos. ```js assert(document.querySelector('head')?.nextElementSibling?.localName === 'body'); ``` -The `head` element should be within the `html` element. +O elemento `head` deve ser filho do elemento `html`. ```js assert([...document.querySelector('html')?.children].some(x => x?.localName === 'head')); ``` -The `body` element should be within the `html` element. +O elemento `body` deve ser filho do elemento `html`. ```js assert([...document.querySelector('html')?.children].some(x => x?.localName === 'body')); ``` -Your code should have a `meta` element. +O código deve ter dois elementos `meta`. ```js const meta = document.querySelector('meta'); assert.exists(meta); ``` -Your `meta` element should have a `charset` attribute with the value `UTF-8`. +O elemento `meta` deve ter o atributo `charset` com o valor `UTF-8`. ```js assert.match(code, /<meta[\s\S]+?charset=('|"|`)UTF-8\1/i) ``` -Your code should have a `title` element. +O código deve ter um elemento `title`. ```js const title = document.querySelector('title'); assert.exists(title); ``` -Your code should have a `link` element. +O código deve ter um elemento `link`. ```js const link = document.querySelector('head > link'); assert.exists(link); ``` -You should have a `div` element. +Você deve ter um elemento `div`. ```js const div = document.querySelector('div'); assert.exists(div); ``` -Your `div` element should have an `id` attribute with the value `game`. +O elemento `div` deve ter um atributo `id` com o valor `game`. ```js const div = document.querySelector('div'); assert.equal(div?.id, 'game'); ``` -Your `div` element should be within the `body` element. +O elemento `div` deve estar dentro do elemento `body`. ```js const div = document.querySelector('div'); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md index c59a26e8a78..aa33bd5ce95 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md @@ -7,7 +7,7 @@ dashedName: step-10 # --description-- -Dê ao `#game` uma largura máxima de `500px` e uma altura máxima de `400px`. Defina a `background-color` como `lightgray` e a `color` como `white`. Use margins to center it by setting the top and bottom margin to `0`, and the left and right margin to `auto`. Finally, give it `10px` of padding on all four sides. +Dê ao `#game` uma largura máxima de `500px` e uma altura máxima de `400px`. Defina a `background-color` como `lightgray` e a `color` como `white`. Use margens para centralizá-lo definindo as margens superior e inferior como `0` e a margem à esquerda e à direita como `auto`. Por fim, dê a ele `10px` de espaçamento (padding) em todos os quatro lados. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md index 453c9a2b5ae..b7e35ca5285 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md @@ -7,7 +7,7 @@ dashedName: step-13 # --description-- -For now, hide your `#monsterStats` element with the `display` property. Não mude nenhum outro estilo. +Por enquanto, oculte o seu elemento `#monsterStats` com a propriedade `display`. Não mude nenhum outro estilo. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index 5514a04c033..d98a98a38c4 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -7,7 +7,7 @@ dashedName: step-16 # --description-- -Uma das ferramentas mais poderosas é o console do desenvolvedor. Dependendo do navegador, ele pode ser aberto pressionando `F12` ou `Ctrl+Shift+I`. On Mac, you can press `Option + ⌘ + C` and select "Console". Você também pode clicar no botão "Console" acima da janela de pré-visualização para ver o console embutido. +Uma das ferramentas mais poderosas é o console do desenvolvedor. Dependendo do navegador, ele pode ser aberto pressionando `F12` ou `Ctrl+Shift+I`. No Mac, você pode pressionar `Option + ⌘ + C` e selecionar "Console". Você também pode clicar no botão "Console" acima da janela de pré-visualização para ver o console embutido. O console do desenvolvedor incluirá erros produzidos pelo código, mas você também pode usá-lo para ver valores de variáveis no código, o que é útil para depuração. diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md index d3f0bb047f8..ec163144a8e 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md @@ -7,19 +7,19 @@ dashedName: step-17 # --description-- -Before you start writing your project code, you should move it to its own file to keep things organized. +Antes de começar a escrever o código do projeto, você deve movê-lo para um arquivo próprio para manter as coisas organizadas. -Remove your `console.log("Hello World");` line. Then give your now empty `script` element a `src` attribute set to `./script.js`. +Remova a linha `console.log("Hello World");`. Em seguida, dê ao elemento `script` vazio um atributo `src` definido como `./script.js`. # --hints-- -You should not have a `console.log("Hello World");` line in your code. +Você não deve ter uma linha `console.log("Hello World");` no código. ```js assert.notMatch(code, /console\.log\("Hello World"\);/); ``` -Your `script` element should have a `src` attribute set to `./script.js`. +O elemento `script` deve ter o atributo `src` definido como `./script.js`. ```js const script = document.querySelector("script[data-src$='script.js']"); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md index 1d28b9a97e7..44f65928326 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md @@ -13,19 +13,19 @@ dashedName: step-20 var camperbot = "Bot"; ``` -This would initialize the `camperbot` variable with a value of `Bot`, a string. +Isso inicializaria a variável `camperbot` com um valor de `Bot`, uma string. -Initialize your `xp` variable to have a value of `0`, a number. +Inicialize a variável `xp` para que tenha um valor de `0`, um número. # --hints-- -`xp` should have a value of `0`. +`xp` deve ter um valor de `0`. ```js assert.equal(xp, 0); ``` -You should initialize the `xp` variable to `0`. Don't forget the semi-colon at the end of the line. +Você deve inicializar a variável `xp` como `0`. Não se esqueça do ponto e vírgula no final da linha. ```js assert.match(code, /var\s+xp\s*=\s*0\s*;/) diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md index 0c42cc1c690..71e0f23c60a 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md @@ -15,41 +15,41 @@ let order = ["first", "second", "third"]; Este é um array que tem três valores. Observe como os valores são separados por vírgulas. -Change your `inventory` variable to be an array with the strings `stick`, `dagger`, and `sword`. +Altere a variável `inventory` para que seja um array com as strings `stick`, `dagger` e `sword`. # --hints-- -Your `inventory` variable should be an array. +A variável `inventory` deve ser um array. ```js assert.isArray(inventory); ``` -Your `inventory` variable should have three values. +A variável `inventory` deve ter três valores. ```js assert.lengthOf(inventory, 3); ``` -Your `inventory` variable should include the string `stick`. +A variável `inventory` deve incluir a string `stick`. ```js assert.include(inventory, "stick"); ``` -Your `inventory` variable should include the string `dagger`. +A variável `inventory` deve incluir a string `dagger`. ```js assert.include(inventory, "dagger"); ``` -Your `inventory` variable should include the string `sword`. +A variável `inventory` deve incluir a string `sword`. ```js assert.include(inventory, "sword"); ``` -Your `inventory` variable should have the values in the correct order. +A variável `inventory` deve ter os valores na ordem correta. ```js assert.deepEqual(inventory, ["stick", "dagger", "sword"]); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md index f0e5b50e0bf..b0e27b1d6ca 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -O JavaScript interage com o HTML usando o <dfn>Modelo de Objeto de Documento</dfn>, ou DOM. O DOM é uma árvore de objetos que representa o HTML. You can access the HTML using the `document` object, which represents your entire HTML document. +O JavaScript interage com o HTML usando o <dfn>Modelo de Objeto de Documento</dfn>, ou DOM. O DOM é uma árvore de objetos que representa o HTML. Você pode acessar o HTML usando o objeto `document`, que representa todo o documento em HTML. Um método para encontrar elementos específicos no HTML é usando o método `querySelector()`. O método `querySelector()` recebe um seletor de CSS como argumento e retorna o primeiro elemento que corresponde ao seletor. Por exemplo, para encontrar o elemento `<h1>` no HTML, você escreveria: @@ -15,25 +15,25 @@ Um método para encontrar elementos específicos no HTML é usando o método `qu let h1 = document.querySelector("h1"); ``` -Note that `h1` is a string and matches the CSS selector you would use. +Observe que `h1` é uma string e corresponde ao seletor CSS que você usaria. -Create a `button1` variable and use `querySelector()` to assign it your element with the `id` of `button1`. Remember that CSS `id` selectors are prefixed with a `#`. +Crie uma variável `button1` e use `querySelector()` para atribuir ao elemento o `id` de `button1`. Lembre-se de que os seletores de CSS `id` são prefixados com um `#`. # --hints-- -You should use `let` to declare a `button1` variable. +Você deve usar `let` para declarar a variável `button1`. ```js assert.match(code, /let button1/); ``` -You should use `document.querySelector()`. +Você deve usar `document.querySelector()`. ```js assert.match(code, /document\.querySelector/); ``` -You should use the `#button1` selector. +Você deve usar o seletor `#button1`. ```js assert.match(code, /querySelector\(('|")#button1\1\)/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md index 94fb8dd6d8d..c949232fe85 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md @@ -9,7 +9,7 @@ dashedName: step-36 `button1` representa o primeiro elemento `button`. Esses elementos têm uma propriedade especial chamada `onclick`, que você pode usar para determinar o que acontece quando alguém clica nesse botão. -You can access properties in JavaScript a couple of different ways. The first is with <dfn>dot notation</dfn>. Accessing the `onclick` property of a button would look like: +Você pode acessar as propriedades em JavaScript de algumas maneiras diferentes. A primeira é com a <dfn>notação de ponto</dfn>. Acessar a propriedade `onclick` de um botão teria essa aparência: ```js button.onclick diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md index 29cde9c11b1..6331862bb61 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md @@ -7,7 +7,7 @@ dashedName: step-43 # --description-- -Now, add a line that updates the text of `button2` to say `Buy weapon (30 gold)` and update the text of `button3` to say `Go to town square`. +Agora, adicione uma linha que atualize o texto do `button2` para que diga `Buy weapon (30 gold)` e atualize o texto do `button3` para que diga `Go to town square`. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md index 91265537736..fd088ef86aa 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md @@ -7,79 +7,79 @@ dashedName: step-44 # --description-- -You will also need to update the functions that run when the buttons are clicked again. +Você também precisará atualizar as funções que são executadas quando os botões forem clicados novamente. -In your `goStore()` function, update the `onclick` property for each button to run `buyHealth`, `buyWeapon`, and `goTown`, respectively. +Na função `goStore()`, atualize a propriedade `onclick` para cada botão para executar `buyHealth`, `buyWeapon` e `goTown`, respectivamente. # --hints-- -You should use dot notation to access the `onclick` property of `button1`. +Você deve usar a notação do ponto para acessar a propriedade `onclick` de `button1`. ```js assert.match(code, /button1\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button1`. +Você não deve usar `let` ou `const` para acessar a propriedade `onclick` de `button1`. ```js assert.notMatch(code, /(let|const)\s+button1.onclick/); ``` -You should set the `onclick` property of `button1` to be `buyHealth`. +Você deve definir a propriedade `onclick` de `button1` para que seja `buyHealth`. ```js assert.match(code, /button1\.onclick\s*=\s*buyHealth/); ``` -You should set the `onclick` property of `button1` in your `goStore` function. +Você deve definir a propriedade `onclick` de `button1` na função `goStore`. ```js assert.match(goStore.toString(), /button1\.onclick\s*=\s*buyHealth/); ``` -You should use dot notation to access the `onclick` property of `button2`. +Você deve usar a notação do ponto para acessar a propriedade `onclick` de `button2`. ```js assert.match(code, /button2\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button2`. +Você não deve usar `let` ou `const` para acessar a propriedade `onclick` de `button2`. ```js assert.notMatch(code, /(let|const)\s+button2.onclick/); ``` -You should set the `onclick` property of `button2` to be `buyWeapon`. +Você deve definir a propriedade `onclick` de `button2` para que seja `buyWeapon`. ```js assert.match(code, /button2\.onclick\s*=\s*buyWeapon/); ``` -You should set the `onclick` property of `button2` in your `goStore` function. +Você deve definir a propriedade `onclick` de `button2` na função `goStore`. ```js assert.match(goStore.toString(), /button2\.onclick\s*=\s*buyWeapon/); ``` -You should use dot notation to access the `onclick` property of `button3`. +Você deve usar a notação do ponto para acessar a propriedade `onclick` de `button3`. ```js assert.match(code, /button3\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button3`. +Você não deve usar `let` ou `const` para acessar a propriedade `onclick` de `button3`. ```js assert.notMatch(code, /(let|const)\s+button3.onclick/); ``` -You should set the `onclick` property of `button3` to be `goTown`. +Você deve definir a propriedade `onclick` de `button3` para que seja `goTown`. ```js assert.match(code, /button3\.onclick\s*=\s*goTown/); ``` -You should set the `onclick` property of `button3` in your `goStore` function. +Você deve definir a propriedade `onclick` de `button3` na função `goStore`. ```js assert.match(goStore.toString(), /button3\.onclick\s*=\s*goTown/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md index 051f56ec8da..6452756f6d7 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md @@ -7,49 +7,49 @@ dashedName: step-48 # --description-- -In your `goTown` function, change your `button` elements' `innerText` properties to be `Go to store`, `Go to cave`, and `Fight dragon`. Atualize as propriedades `onclick` para que sejam `goStore`, `goCave` e `fightDragon`, respectivamente. +Na função `goTown`, altere as propriedades `innerText` dos elementos `button` para que sejam `Go to store`, `Go to cave` e `Fight dragon`. Atualize as propriedades `onclick` para que sejam `goStore`, `goCave` e `fightDragon`, respectivamente. -Finally, update your text's `innerText` property to be `You are in the town square. You see a sign that says Store.`. +Finalmente, atualize a propriedade `innerText` do texto para que seja `You are in the town square. You see a sign that says Store.`. # --hints-- -You should set the `button1.innerText` property to be `Go to store` in your `goTown` function. +Você deve definir a propriedade `button1.innerText` para que seja `Go to store` na função `goTown`. ```js assert.match(goTown.toString(), /button1\.innerText\s*=\s*('|")Go to store\1/); ``` -You should set the `button2.innerText` property to be `Go to cave` in your `goTown` function. +Você deve definir a propriedade `button2.innerText` para que seja `Go to cave` na função `goTown`. ```js assert.match(goTown.toString(), /button2\.innerText\s*=\s*('|")Go to cave\1/); ``` -You should set the `button3.innerText` property to be `Fight dragon` in your `goTown` function. +Você deve definir a propriedade `button3.innerText` para que seja `Fight dragon` na função `goTown`. ```js assert.match(goTown.toString(), /button3\.innerText\s*=\s*('|")Fight dragon\1/); ``` -You should set the `button1.onclick` property to be `goStore` in your `goTown` function. +Você deve definir a propriedade `button1.onclick` para que seja `goStore` na função `goTown`. ```js assert.match(goTown.toString(), /button1\.onclick\s*=\s*goStore/); ``` -You should set the `button2.onclick` property to be `goCave` in your `goTown` function. +Você deve definir a propriedade `button2.onclick` para que seja `goCave` na função `goTown`. ```js assert.match(goTown.toString(), /button2\.onclick\s*=\s*goCave/); ``` -You should set the `button3.onclick` property to be `fightDragon` in your `goTown` function. +Você deve definir a propriedade `button3.onclick` para que seja `fightDragon` na função `goTown`. ```js assert.match(goTown.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -You should set the `text.innerText` property to be `You are in the town square. You see a sign that says Store.` in your `goTown` function. +Você deve definir a propriedade `text.innerText` como sendo `You are in the town square. You see a sign that says Store.` na sua função `goTown`. ```js assert.match(goTown.toString(), /text\.innerText\s*=\s*('|")You are in the town square. You see a sign that says Store\.\1/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md index 25761cf41fd..607e171a07c 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md @@ -11,17 +11,17 @@ Anteriormente, você usou um array para armazenar strings. No entanto, arrays po Objetos são indicados por chaves. Um objeto vazio pareceria com `{}`. -Add an empty object to your `locations` array. +Adicione um objeto vazio ao array `locations`. # --hints-- -Your first value of `locations` should be an object. +O primeiro valor de `locations` deve ser um objeto. ```js assert.isObject(locations[0]); ``` -Your first value of `locations` should be an empty object. +O primeiro valor de `locations` deve ser um objeto vazio. ```js assert.deepEqual(locations[0], {}); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md index 0046bdc62ac..80f60306542 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md @@ -9,7 +9,7 @@ dashedName: step-54 Assim como os valores de array, as propriedades de objeto são separadas por uma vírgula. Adicione uma vírgula após a propriedade `name` e adicione uma propriedade `button text` com o valor de um array vazio. -Note that, because the property name has more than one word, you'll need to surround it in quotes. For example: +Observe que o nome da propriedade tem mais de uma palavra e que, por isso, você precisará envolvê-lo em aspas. Por exemplo: ```js { diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md index 2b4b67c63f7..223db9e14c4 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md @@ -9,7 +9,7 @@ dashedName: step-60 Em vez de atribuir as propriedades `innerText` e `onclick` para sequências de caracteres e funções específicas, a função `update` usará dados de `location` que são passados para ela. Em primeiro lugar, esses dados têm de ser transmitidos. -Inside the `goTown` function, call the `update` function. Here is an example of calling a function named `myFunction`: +Dentro da função `goTown`, chame a função `update`. Aqui está um exemplo de chamada de uma função com o nome de `myFunction`: ```js myFunction(); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md index fbecc786102..7e008909802 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md @@ -7,7 +7,7 @@ dashedName: step-61 # --description-- -Agora você precisa passar o argumento `location` para a chamada de `update`. Você passa argumentos incluindo-os entre os parênteses da chamada da função. For example, calling `myFunction` with an `arg` argument would look like: +Agora você precisa passar o argumento `location` para a chamada de `update`. Você passa argumentos incluindo-os entre os parênteses da chamada da função. Por exemplo, chamar `myFunction` com um argumento `arg` ficaria assim: ```js myFunction(arg) diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index 76cb66b70c2..ef7427781a2 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -9,31 +9,31 @@ dashedName: step-62 O array `locations` contém dois locais: a praça da cidade (em inglês, `town square`) e a loja (em inglês, `store`). No momento, você está passando esse array inteiro para a função de `update`. -Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +Passe apenas o primeiro elemento do array `locations` adicionando `[0]` no final da variável. Por exemplo: `myFunction(arg[0]);`. -This is called <dfn>bracket notation</dfn>. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. +Isso é chamado de <dfn>notação de colchete</dfn>. Valores em um array são acessados pelo índice. Índices são valores numéricos e começam em 0 – isto é chamado de indexação baseada em zero. `arg[0]` deve ser o primeiro elemento no array `arg`. # --hints-- -You should use bracket notation with `locations`. +Você deve usar a notação de colchetes com `locations`. ```js assert.match(code, /locations\[/); ``` -You should access the first object in the `locations` array. Remember that arrays are zero-based. +Você deve acessar o primeiro objeto no array `locations`. Lembre-se de que os arrays são baseados em zero. ```js assert.match(code, /locations\[0\]/); ``` -You should pass the first object in the `locations` array into the `update` function. +Agora, você deve passar o primeiro objeto no array `locations` para a função `update`. ```js assert.match(code, /update\(locations\[0\]\);/); ``` -This call should still be in your `goTown()` function. +Esta chamada ainda deve estar na função `goTown()`. ```js assert.match(goTown.toString(), /update\(locations\[0\]\);/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md index 2fb69553c6c..1b11f425d96 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md @@ -7,19 +7,19 @@ dashedName: step-63 # --description-- -Now your `update` function needs to use the argument you pass into it. +Agora, a função `update` precisa usar o argumento que você passa para ele. -Inside the `update` function, change the value of the `button1.innerText` assignment to be `location["button text"]`. That way, you use bracket notation to get the `button text` property of the `location` object passed into the function. +Dentro da função `update`, altere o valor de atribuição de `button1.innerText` para que seja `location["button text"]`. Desse modo, você usará a notação de colchetes para obter a propriedade `button text` do objeto `location` passado para a função. # --hints-- -Your `update` function should use bracket notation to get the `button text` property of the `location` object passed into the function. +A função `update` deve usar a notação de colchete para obter a propriedade `button text` do objeto `location` passado para a função. ```js assert.match(update.toString(), /location[('|")button text\1]/); ``` -You should assign the value of the `button text` property of the `location` object to the `innerText` property of `button1`. +Você deve atribuir o valor da propriedade `button text` do objeto `location` para a propriedade `innerText` do `button1`. ```js assert.match(update.toString(), /button1\.innerText\s*=\s*location\[('|")button text\1\]/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index 1712a8843a1..047be865162 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -9,7 +9,7 @@ dashedName: step-67 Finalmente, atualize a atribuição `text.innerText` para que seja igual ao `text` do objeto `location`. No entanto, em vez de usar notação de colchete, use a <dfn>notação de ponto</dfn>. -Here is an example of accessing the `name` property of an object called `person`: +Aqui está um exemplo acesso à propriedade `name` de um objeto chamado `person`: ```js person.name diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md index 48d912d5925..ff4a4cac4ca 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md @@ -7,11 +7,11 @@ dashedName: step-75 # --description-- -Now that you are updating the `gold` and `health` variables, you need to display those new values on the game screen. +Agora que você está atualizando as variáveis `gold` e `health`, você precisa mostrar esses novos valores na tela do jogo. -After your assignment lines, assign the `innerText` property of `goldText` to be the variable `gold`. Use the same pattern to update `healthText` with the `health` variable. +Após as linhas da atividade, atribua à propriedade `innerText` de `goldText` a variável `gold`. Use o mesmo padrão para atualizar `healthText` com a variável `health`. -Here is an example: +Aqui está um exemplo: ```js let value = 100; @@ -19,9 +19,9 @@ const total = document.querySelector('#total'); total.innerText = value; ``` -You can test this by clicking your "Go to store" button, followed by your "Buy Health" button. +Você pode testar isso clicando no botão "Go to store", seguido do botão "Buy Heath". -**Note:** Your answer should only be two lines of code. +**Observação:** sua resposta deve ter apenas duas linhas de código. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md index 79bec42d05f..2153f8b759a 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md @@ -7,7 +7,7 @@ dashedName: step-78 # --description-- -Now when a player tries to buy health, it will only work if they have enough money. Se não tiver, nada acontecerá. Adicione uma instrução `else` onde você pode colocar código para executar se um jogador não tiver dinheiro suficiente. +Agora, quando um jogador tentar comprar vida, isso só funcionará se ele tiver dinheiro suficiente. Se não tiver, nada acontecerá. Adicione uma instrução `else` onde você pode colocar código para executar se um jogador não tiver dinheiro suficiente. Aqui está um exemplo de uma instrução `else` vazia: diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md index f4925fe2123..27e97038120 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md @@ -9,7 +9,7 @@ dashedName: step-84 O valor da variável `currentWeapon` corresponde a um índice no array `weapons`. O jogador começa com um `stick`, já que `currentWeapon` começa em `0` e `weapons[0]` é a arma `stick`. -In the `buyWeapon` function, use compound assignment to add `1` to `currentWeapon` - the user is buying the next weapon in the `weapons` array. +Na função `buyWeapon`, use a atribuição composta para somar `1` a `currentWeapon` – o usuário está comprando a próxima arma no array `weapons`. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md index 93c1b816be1..41436f76155 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md @@ -7,7 +7,7 @@ dashedName: step-88 # --description-- -Use bracket notation to access an object within the `weapons` array and assign it to your `newWeapon` variable. Place the variable `currentWeapon` within the brackets. +Use notação de colchetes para acessar um objeto dentro do array `weapons` e para atribuí-lo à variável `newWeapon`. Coloque a variável `currentWeapon` dentro dos colchetes. Quando você usa uma variável na notação de colchete, você está acessando a propriedade ou índice pelo *valor* dessa variável. diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md index 69de576f799..2995f981bbe 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md @@ -7,26 +7,26 @@ dashedName: step-92 # --description-- -Up until now, any time `text.innerText` was updated, the old text was erased. Desta vez, use o operador `+=` para adicionar texto ao final do `text.innerText`. +Até agora, toda vez que `text.innerText` era atualizado, o texto antigo era apagado. Desta vez, use o operador `+=` para adicionar texto ao final do `text.innerText`. -Add the string `In your inventory you have:` - include the spaces at the beginning and the end. +Adicione a string `In your inventory you have:` – inclua os espaços no início e no final. # --hints-- -You should add a new line with `text.innerText`. +Você deve adicionar uma nova linha com `text.innerText`. ```js const matches = buyWeapon.toString().match(/text\.innerText/g); assert.lengthOf(matches, 2); ``` -You should use the `+=` operator to add to `text.innerText`. +Você deve usar o operador `+=` para adicionar `text.innerText`. ```js assert.match(buyWeapon.toString(), /text\.innerText\s*\+=\s*/) ``` -You should add the string `In your inventory you have:` to the end of `text.innerText`. Mind the spaces! +Você deve adicionar a string `In your inventory you have:` no final do `text.innerText`. Cuidado com os espaços! ```js assert.match(buyWeapon.toString(), /text\.innerText\s*\+=\s*('|")\sIn your inventory you have:\s\1/) diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md index 70d5c0c191c..e3b4e062b9a 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md @@ -9,17 +9,17 @@ dashedName: step-96 Arrays têm uma propriedade `length` que retorna o número de itens no array. Você pode querer adicionar novos valores ao array `weapons` no futuro. -Change your `if` condition to check if `currentWeapon` is less than the length of the `weapons` array. An example of checking the length of an array `myArray` would look like `myArray.length`. +Altere a condição `if` para verificar se `currentWeapon` é menor do que o comprimento do array `weapons`. Um exemplo de verificação do comprimento de um array `myArray` ficaria como `myArray.length`. # --hints-- -You should use the `length` property on the `weapons` array. +Você deve usar a propriedade `length` no array `weapons`. ```js assert.match(buyWeapon.toString(), /weapons\.length/); ``` -Your `if` statement should check if `currentWeapon` is less than `weapons.length`. +A instrução `if` deve verificar se `currentWeapon` é menor que `weapons.length`. ```js assert.match(buyWeapon.toString(), /currentWeapon\s*<\s*weapons\.length/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md index ef54409a40c..3dda50777b1 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md @@ -9,17 +9,17 @@ dashedName: step-97 Agora, você tem um erro para consertar. A variável `currentWeapon` é o índice do array `weapons`, mas a indexação do array começa em zero. O índice do último elemento em um array é um a menos do que o tamanho do array. -Change the `if` condition to check `weapons.length - 1`, instead of `weapons.length`. +Mude a condição `if` para que verifique `weapons.length - 1`, ao invés de `weapons.length`. # --hints-- -You should update the condition to subtract `1` from `weapons.length`. +Você deve atualizar a condição para que subtraia `1` de `weapons.length`. ```js assert.match(buyWeapon.toString(), /weapons\.length\s*-\s*1/); ``` -Your condition should check if `currentWeapon` is less than `weapons.length - 1`. +A condição deve verificar se `currentWeapon` é menor que `weapons.length - 1`. ```js assert.match(buyWeapon.toString(), /currentWeapon\s*<\s*weapons\.length\s*-\s*1/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md index 49ea5b58dda..db2d6aa6e15 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md @@ -7,31 +7,31 @@ dashedName: step-99 # --description-- -Once a player has the most powerful weapon, you can give them the ability to sell their old weapons. +Quando um jogador tiver a arma mais poderosa, você pode dar a ele a habilidade de vender as outras armas. -In the outer `else` statement, set `button2.innerText` to `Sell weapon for 15 gold`. Also set `button2.onclick` to the function name `sellWeapon`. +Na instrução `else` externa, defina `button2.innerText` como `Sell weapon for 15 gold`. Também defina `button2.onclick` para o nome de função `sellWeapon`. # --hints-- -You should set the value of `button2.innerText`. +Você deve definir o valor de `button2.innerText`. ```js assert.match(buyWeapon.toString(), /button2\.innerText/); ``` -You should set the value of `button2.innerText` to `Sell weapon for 15 gold`. +Você deve definir o valor de `button2.innerText` como `Sell weapon for 15 gold`. ```js assert.match(buyWeapon.toString(), /button2\.innerText\s*=\s*('|")Sell weapon for 15 gold\1;/); ``` -You should set the value of `button2.onclick`. +Você deve definir o valor de `button2.onclick`. ```js assert.match(buyWeapon.toString(), /button2\.onclick/); ``` -You should set the value of `button2.onclick` to `sellWeapon`. +Você deve definir o valor de `button2.onclick` como `sellWeapon`. ```js assert.match(buyWeapon.toString(), /button2\.onclick\s*=\s*sellWeapon;/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md index d7a39fe1aca..eb4bc7daca4 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md @@ -7,7 +7,7 @@ dashedName: step-111 # --description-- -Seguindo o mesmo padrão, use esse código nas funções `fightBeast` e `fightDragon`. Lembre-se de que `beast` está no índice `1` e `dragon` está no índice `2`. Also, remove the `console.log` call from your `fightDragon` function. +Seguindo o mesmo padrão, use esse código nas funções `fightBeast` e `fightDragon`. Lembre-se de que `beast` está no índice `1` e `dragon` está no índice `2`. Além disso, remova a chamada a `console.log` da função `fightDragon`. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md index 7e6b9add175..2851229696e 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md @@ -7,7 +7,7 @@ dashedName: step-115 # --description-- -Embaixo da chamada de `update`, defina `monsterHealth` como a saúde do monstro atual. You can get this value by accessing the `health` property of `monsters[fighting]` with dot notation. +Embaixo da chamada de `update`, defina `monsterHealth` como a saúde do monstro atual. Você pode obter esse valor acessando a propriedade `health` de `monsters[fighting]` com a notação de ponto. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md index dbfa8093a7e..997b364b398 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md @@ -7,7 +7,7 @@ dashedName: step-117 # --description-- -Now, set the `innerText` property of `monsterName` to be the `name` property of the current monster. Faça o mesmo para `monsterHealthText` e a propriedade `health`. +Agora, defina a propriedade `innerText` de `monsterName` para ser a propriedade `name` do monstro atual. Faça o mesmo para `monsterHealthText` e a propriedade `health`. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md index 57184011741..e6492a76b5e 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md @@ -11,7 +11,7 @@ O JavaScript oferece o utilitário `Math` integrado, que oferece várias ferrame Ao usá-las, você pode gerar um número aleatório dentro de um intervalo. Por exemplo, isso gera um número aleatório entre 1 e 5: `Math.floor(Math.random() * 5) + 1;`. -Following this pattern, use the addition operator (`+`) to add a random number between `1` and the value of `xp` to your `monsterHealth` variable change. +Seguindo este padrão, use o operador de adição (`+`) para adicionar um número aleatório entre `1` e o valor de `xp` à variável `monsterHealth` alterada. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md index 6b6f11d4941..ad88a535cd3 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md @@ -7,43 +7,43 @@ dashedName: step-132 # --description-- -Your `locations` array doesn't have a fifth element, so `locations[4]` doesn't work. +O array `locations` não tem um quinto elemento. Portanto, `locations[4]` não funciona. -Add a new object at the end of the `locations` array, following the same structure as the other objects. Set `name` to `kill monster`, set `button text` to an array with three `Go to town square` strings, set `button functions` to an array with three `goTown` variables, and set `text` to `The monster screams Arg! as it dies. You gain experience points and find gold.`. +Adicione um novo objeto ao final do array `locations`, seguindo a mesma estrutura do resto dos objetos. Defina `name` como `kill monster`, defina `button text` como um array com três strings `Go to town square`, defina `button functions` como um array com três variáveis `goTown` e defina `text` como `The monster screams Arg! as it dies. You gain experience points and find gold.`. # --hints-- -Your `locations` array should have five values. +A variável `locations` deve ter cinco valores. ```js assert.lengthOf(locations, 5); ``` -Your fifth `locations` value should be an object. +O quinto valor de `locations` deve ser um objeto. ```js assert.isObject(locations[4]); ``` -Your fifth `locations` value should have a `name` property with the value `kill monster`. +O quinto valor de `locations` deve ter uma propriedade `name` com o valor `kill monster`. ```js assert.equal(locations[4].name, 'kill monster'); ``` -Your fifth `locations` value should have a `button text` array with three `Go to town square` strings. +O quinto valor de `locations` deve ter um array `button text` com três strings `Go to town square`. ```js assert.deepEqual(locations[4]["button text"], ['Go to town square', 'Go to town square', 'Go to town square']); ``` -Your fifth `locations` value should have a `button functions` array with three `goTown` variables. +O quinto valor de `locations` deve ter um array `button functions` com três variáveis `goTown`. ```js assert.deepEqual(locations[4]["button functions"], [goTown, goTown, goTown]); ``` -Your fifth `locations` value should have a `text` property with the value `The monster screams Arg! as it dies. You gain experience points and find gold.`. +O quinto valor de `locations` deve ter uma propriedade `text` com o valor `The monster screams Arg! as it dies. You gain experience points and find gold.`. ```js assert.equal(locations[4].text, 'The monster screams Arg! as it dies. You gain experience points and find gold.'); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md index d575bfbbef1..9f971df2879 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md @@ -9,17 +9,17 @@ dashedName: step-133 A palavra `Arg!` deve ter aspas ao redor dela. Além de escapar as aspas, há outra maneira você pode incluir aspas dentro de uma string. -Change the double quotes around the string `The monster screams Arg! as it dies. You gain experience points and find gold.` to single quotes `'`, then add double quotes around `Arg!`. +Mude as aspas duplas em torno da string `The monster screams Arg! as it dies. You gain experience points and find gold.` para aspas simples `'` e adicione aspas duplas em torno de `Arg!`. # --hints-- -You should use single quotes around the string. +Você deve usar aspas simples em torno da string. ```js assert.match(code, /'The monster screams "?Arg!"? as it dies. You gain experience points and find gold.'/); ``` -You should use double quotes around `Arg!`. +Você deve usar aspas duplas em torno de `Arg!`. ```js assert.equal(locations[4].text, 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md index 4b5bc49746c..1e4367080cf 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md @@ -7,25 +7,25 @@ dashedName: step-134 # --description-- -After a monster is defeated, the monster's stat box should no longer display. +Depois que um monstro é derrotado, a caixa de estatística do monstro não deve mais ser exibida. -On the first line of the `update` function, use `monsterStats.style.display` to change the `display` value to `none`. +Na primeira linha da função `update`, use `monsterStats.style.display` para alterar o valor de `display` para `none`. # --hints-- -You should use `monsterStats.style.display` in the `update` function. +Você deve usar `monsterStats.style.display` na função `update`. ```js assert.match(update.toString(), /monsterStats\.style\.display/); ``` -You should set `monsterStats.style.display` to `none`. +Você deve definir `monsterStats.style.display` como `none`. ```js assert.match(update.toString(), /monsterStats\.style\.display\s*=\s*('|")none\1/); ``` -You should add your code in the first line of the `update` function. +Você deve adicionar o código à primeira linha da função `update`. ```js assert.match(update.toString(), /update\s*\(\s*location\s*\)\s*\{\s*monsterStats\.style\.display\s*=\s*('|")none\1/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md index 63bdb20df1c..e428a41257e 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md @@ -28,7 +28,7 @@ const block = attack.toString().split("else if"); assert.include(block[1], "if"); ``` -Your new `if` statement should check if `fighting` is strictly equal to `2`. +A nova instrução `if` deve verificar se `fighting` é estritamente igual a `2`. ```js const block = attack.toString().split("else if"); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md index f016464b738..5edf040e700 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md @@ -7,7 +7,7 @@ dashedName: step-148 # --description-- -In your `attack` function, below the `health` variable, create an `if` statement. Defina a condição para chamar a função `isMonsterHit`. +Na função `attack`, abaixo da variável `health`, crie uma instrução `if`. Defina a condição para chamar a função `isMonsterHit`. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md index 8e3d0ad9bdd..c87053a54a2 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md @@ -7,7 +7,7 @@ dashedName: step-150 # --description-- -Add an `else` statement to the first `if` statement inside you `attack()` function. Na instrução `else`, use o operador `+=` para adicionar o texto `You miss.` até o final do `text.innerText`. +Adicione uma instrução `else` à primeira instrução `if` dentro da função `attack()`. Na instrução `else`, use o operador `+=` para adicionar o texto `You miss.` até o final do `text.innerText`. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md index 6686293900b..1475d1505fe 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md @@ -7,11 +7,11 @@ dashedName: step-152 # --description-- -The player should hit if either `Math.random() > .2` **or** if the player's health is less than 20. +O jogador deve acertar o inimigo se `Math.random() > .2` **ou** se a vida do jogador for menor que 20. -At the end of your `return` statement, use the <dfn>logical or</dfn> operator `||` and check if `health` is less than `20`. +Ao final da instrução `return`, use o operador <dfn>lógico ou</dfn> `||` e verifique se `health` é menor que `20`. -The logical or operator will use the first value if it is truthy – that is, anything apart from `NaN`, `null`, `0`, `-0`, `0n`, `""`, and `false`. Otherwise, it will use the second value. +O operador lógico OR usará o primeiro valor, se for verdadeiro – isto é, qualquer coisa além de `NaN`, `null`, `0`, `-0`, `0n`, `""` e `false`. Caso contrário, ele utilizará o segundo valor. Por exemplo: `num < 10 || num > 20`. diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md index 8099d180ec2..d8c8077fdd0 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md @@ -9,17 +9,17 @@ dashedName: step-34 Finalmente, use `querySelector()` para obter o elemento `#monsterHealth`. Como você já declarou uma variável `monsterHealth` anteriormente, você precisa usar um nome de variável diferente a esse elemento. -Declare a new variable with the `const` keyword and name it `monsterHealthText`. +Declare uma nova variável com a palavra-chave `const` e nomeie-a `monsterHealthText`. # --hints-- -You should declare a `monsterHealthText` variable with `const`. +Você deve declarar uma variável `monsterHealthText` com `const`. ```js assert.match(code, /const monsterHealthText/); ``` -Your `monsterHealthText` variable should have the value of your `#monsterHealth` element. +A variável `monsterHealthText` ainda deve ter o valor do elemento `#monsterHealth`. ```js assert.deepEqual(monsterHealthText, document.querySelector('#monsterHealth')); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.md index 3a8741aff68..c6d7d182e78 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.md @@ -23,7 +23,7 @@ let inventory = foods[selectedFood]; # --hints-- -`checkInventory` повинен бути функцією. +`checkInventory` має бути функцією. ```js assert.strictEqual(typeof checkInventory, 'function'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md index 43d09c8bf7a..f393f85812e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.md @@ -11,13 +11,13 @@ dashedName: assignment-with-a-returned-value Якщо пригадати з нашої розмови про <a href="/ukrainian/learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank" rel="noopener noreferrer nofollow">збереження значень за допомогою оператора присвоєння</a>, все, що знаходиться праворуч від знака рівності вирішено ще до того, як значення буде присвоєне. Це означає, що ми можемо взяти повернене значення функції та присвоїти його змінній. -Assume we have defined a function `sum` which adds two numbers together. +Припустимо, що ми визначили функцію `sum`, яка додає два числа. ```js ourSum = sum(5, 12); ``` -Calling the `sum` function with the arguments of `5` and `12` produces a return value of `17`. This return value is assigned to the `ourSum` variable. +Виклик функції `sum` з аргументами `5` та `12` призведе до поверненого значення `17`. Це повернене значення присвоюється до змінної `ourSum`. # --instructions-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index 2ee4203581a..c55f4e6398f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -19,7 +19,11 @@ dashedName: escape-sequences-in-strings Присвойте наступні 3 рядки тексту до єдиної змінної `myStr`, використовуючи екрановану послідовність. -<blockquote>FirstLine<br>    \SecondLine<br>ThirdLine</blockquote> +<pre> +FirstLine + \SecondLine +ThirdLine +</pre> Ви повинні використати керуючі послідовності, щоб правильно встановити спеціальні символи. Ви також повинні дотримуватись інтервалу, як показано вище, без пробілів між керуючими послідовностями або словами. diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.md index 5730ae34913..7fcd292825f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.md @@ -27,7 +27,7 @@ function testFun(param1, param2) { # --hints-- -`functionWithArgs` повинна бути функцією. +`functionWithArgs` має бути функцією. ```js assert(typeof functionWithArgs === 'function'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index b294228045f..81af6aede43 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -60,43 +60,43 @@ assert(!/if/g.test(code)); assert(code.match(/break/g).length >= 4); ``` -`chainToSwitch("bob")` має бути рядком `Marley` +`chainToSwitch("bob")` should return the string `Marley` ```js assert(chainToSwitch('bob') === 'Marley'); ``` -`chainToSwitch(42)` має бути рядком `The Answer` +`chainToSwitch(42)` should return the string `The Answer` ```js assert(chainToSwitch(42) === 'The Answer'); ``` -`chainToSwitch(1)` має бути рядком `There is no #1` +`chainToSwitch(1)` should return the string `There is no #1` ```js assert(chainToSwitch(1) === 'There is no #1'); ``` -`chainToSwitch(99)` має бути рядком `Missed me by this much!` +`chainToSwitch(99)` should return the string `Missed me by this much!` ```js assert(chainToSwitch(99) === 'Missed me by this much!'); ``` -`chainToSwitch(7)` має бути рядком `Ate Nine` +`chainToSwitch(7)` should return the string `Ate Nine` ```js assert(chainToSwitch(7) === 'Ate Nine'); ``` -`chainToSwitch("John")` має бути `""` (пустим рядком) +`chainToSwitch("John")` should return `""` (empty string) ```js assert(chainToSwitch('John') === ''); ``` -`chainToSwitch(156)` має бути `""` (пустим рядком) +`chainToSwitch(156)` should return `""` (empty string) ```js assert(chainToSwitch(156) === ''); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-arguments-passed-in-the-wrong-order-when-calling-a-function.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-arguments-passed-in-the-wrong-order-when-calling-a-function.md index ca1844da895..2024bbbde74 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-arguments-passed-in-the-wrong-order-when-calling-a-function.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-arguments-passed-in-the-wrong-order-when-calling-a-function.md @@ -1,6 +1,6 @@ --- id: 587d7b85367417b2b2512b3a -title: Знаходження переданих у неправильному порядку аргументів під час виклику функції +title: Аргументи, передані у неправильному порядку challengeType: 1 forumTopicId: 301184 dashedName: catch-arguments-passed-in-the-wrong-order-when-calling-a-function @@ -8,21 +8,21 @@ dashedName: catch-arguments-passed-in-the-wrong-order-when-calling-a-function # --description-- -Продовжуючи обговорення виклику функцій, наступною помилкою може бути пошук аргументів функції, переданих у неправильному порядку. Якщо аргументи відносяться до різних типів, наприклад, функцій з масивами та цілими числами, то це, ймовірно, призведе до помилок в коді. Якщо аргументи відносяться до одного типу (наприклад, усі з них - цілі числа), тоді послідовність коду не матиме сенсу. Переконайтеся, що усі необхідні аргументи розташовано у правильному порядку, щоб уникнути цих проблем. +Продовжуючи обговорення виклику функцій: наступною помилкою можуть бути аргументи функції, передані у неправильному порядку. Якщо аргументи належать до різних типів, (наприклад, функція очікує масив та ціле число), то це, ймовірно, призведе до помилки виконання. Якщо аргументи належать до одного типу (наприклад, усі є цілими числами), то логіка коду не матиме сенсу. Переконайтеся, що усі необхідні аргументи розташовано у правильному порядку, щоб уникнути цих проблем. # --instructions-- -Функція `raiseToPower` підносить основу до ступеня. На жаль, його не викликано належним чином - виправіть код так, щоб значення `power` дорівнювало 8. +Функція `raiseToPower` підносить основу до степеня. На жаль, її не викликано належним чином. Виправте код так, щоб значенням `power` було 8. # --hints-- -Ваш код має виправити змінну `power`, щоб вона дорівнювала 2-ом піднесеним до 3 ступеня, а не 3-ом піднесеним до 2 ступеня. +Ваш код повинен виправити змінну `power` так, щоб вона дорівнювала 2 у 3 степені, а не 3 у 2 степені. ```js assert(power == 8); ``` -Ваш код має використовувати правильний порядок аргументів для виклику функції `raiseToPower`. +Ваш код повинен використовувати правильний порядок аргументів для виклику функції `raiseToPower`. ```js assert(code.match(/raiseToPower\(\s*?base\s*?,\s*?exp\s*?\);/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-missing-open-and-closing-parenthesis-after-a-function-call.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-missing-open-and-closing-parenthesis-after-a-function-call.md index 16ea3616930..df5d2e9e7a1 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-missing-open-and-closing-parenthesis-after-a-function-call.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-missing-open-and-closing-parenthesis-after-a-function-call.md @@ -1,6 +1,6 @@ --- id: 587d7b85367417b2b2512b39 -title: Знаходження пропущених відкриваючих та закриваючих дужок після виклику функції +title: Пропущені відкриваючі та закриваючі дужки challengeType: 1 forumTopicId: 301185 dashedName: catch-missing-open-and-closing-parenthesis-after-a-function-call @@ -8,7 +8,7 @@ dashedName: catch-missing-open-and-closing-parenthesis-after-a-function-call # --description-- -Коли функція чи метод не приймає жодних аргументів, під час їх виклику ви можете забути додати (порожні) відкриваючі та закриваючі дужки. Зазвичай результат виклику функції зберігається у змінних для подальшого використання у вашому коді. Цю помилку можна розпізнати шляхом вводу змінних значень (або їхніх типів) у консоль, поки одне з них не матиме посилання на функцію замість очікуваного значення, яке вона має повертати. +Якщо функція чи метод не приймає жодних аргументів, ви можете забути додати (порожні) відкриваючі та закриваючі дужки під час виклику. Зазвичай результат виклику функції зберігається у змінних для подальшого використання у вашому коді. Цю помилку можна виявити шляхом вводу значень змінних (або їх типів) на консолі та перевірки того, що змінна визначена для посилання на функцію замість очікуваного значення, яке повертає функція. Змінні у поданому нижче прикладі є різними: @@ -20,7 +20,7 @@ let varOne = myFunction; let varTwo = myFunction(); ``` -У випадку `varOne` є функцією `myFunction`, і `varTwo` є рядком `You rock!`. +У цьому випадку `varOne` є функцією `myFunction`, а `varTwo` є рядком `You rock!`. # --instructions-- @@ -28,13 +28,13 @@ let varTwo = myFunction(); # --hints-- -Ваш код має виправити змінну `result` так, щоб вона була встановлена числом, яке функція `getNine` повертатиме. +Ваш код повинен виправити змінну `result` так, щоб її значення було числом, яке повертає функція `getNine`. ```js assert(result == 9); ``` -Ваш код має викликати функцію `getNine`. +Ваш код повинен викликати функцію `getNine`. ```js assert(code.match(/getNine\(\)/g).length == 2); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-off-by-one-errors-when-using-indexing.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-off-by-one-errors-when-using-indexing.md index 2cc13a15c0a..35bae1b6d1e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-off-by-one-errors-when-using-indexing.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/catch-off-by-one-errors-when-using-indexing.md @@ -1,6 +1,6 @@ --- id: 587d7b86367417b2b2512b3b -title: Знаходження помилок неврахованої одиниці при індексуванні +title: Помилка неврахованої одиниці при індексуванні challengeType: 1 forumTopicId: 301189 dashedName: catch-off-by-one-errors-when-using-indexing @@ -8,9 +8,9 @@ dashedName: catch-off-by-one-errors-when-using-indexing # --description-- -<dfn>Помилки неврахованої одиниці</dfn> (також відомі як помилки на одиницю) виникають, коли ви намагаєтеся обрати конкретний індекс рядка чи масиву (для виокремлення чи отримання доступу до цього сегмента) або під час створення з них циклів. Індексування JavaScript починається з нуля, а не одиниці, що означає, що останній індекс завжди буде на одиницю меншим, ніж довжина елемента. Якщо ви спробуєте отримати доступ до індексу рівному довжині, програма повідомить про помилку "індексу поза діапазоном" або виведе на екран результат `undefined`. +<dfn>Помилки неврахованої одиниці</dfn> виникають, коли ви намагаєтеся націлити конкретний індекс рядка чи масиву (щоб виокремити чи отримати доступ до сегмента) або під час використання циклів. Індексування JavaScript починається з нуля, а не одиниці, тобто останній індекс завжди буде на одиницю меншим за довжину елемента. Якщо ви спробуєте отримати доступ до індексу рівному довжині, програма повідомить про помилку «індексу поза діапазоном» або надрукує `undefined`. -Якщо ви використовуєте методи рядка чи масиву, які беруть діапазон індексу за аргумент, прочитання документації допоможе зрозуміти, чи вони включають елементи (коли елемент за заданим індексом є частиною отриманого результату), чи ні. Ось кілька прикладів помилок неврахованої одиниці: +Якщо ви використовуєте методи рядка чи масиву, які приймають діапазон індексу як аргумент, варто прочитати документацію та зрозуміти, чи вони враховують всі елементи (тобто елемент за заданим індексом є частиною отриманого результату). Ось кілька прикладів помилок неврахованої одиниці: ```js let alphabet = "abcdefghijklmnopqrstuvwxyz"; @@ -34,25 +34,25 @@ for (let k = 0; k < len; k++) { # --hints-- -Ваш код має встановити початкову умову циклу так, щоб він починався з першого індексу. +Ваш код повинен встановити початкову умову циклу так, щоб він починався з першого індексу. ```js assert(code.match(/i\s*?=\s*?0\s*?;/g).length == 1); ``` -Ваш код має виправити початкову умову циклу таким чином, щоб індекс починався з 0. +Ваш код повинен виправити початкову умову циклу таким чином, щоб індекс починався з 0. ```js assert(!code.match(/i\s?=\s*?1\s*?;/g)); ``` -Ваш код має встановити кінцеву умову циклу так, щоб він закінчувався на останньому індексі. +Ваш код повинен встановити кінцеву умову циклу так, щоб він закінчувався на останньому індексі. ```js assert(code.match(/i\s*<\s*len\s*;|i\s*<=\s*len\s*-\s*1\s*;/g).length == 1); ``` -Ваш код має виправити кінцеву умову циклу таким чином, щоб він зупинявся на 1 перед одиницею довжини. +Ваш код повинен встановити кінцеву умову циклу таким чином, щоб він зупинявся на одиниці від довжини. ```js assert(!code.match(/i\s*?<=\s*?len;/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/prevent-infinite-loops-with-a-valid-terminal-condition.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/prevent-infinite-loops-with-a-valid-terminal-condition.md index 467dbfc3104..71824eddb74 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/prevent-infinite-loops-with-a-valid-terminal-condition.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/prevent-infinite-loops-with-a-valid-terminal-condition.md @@ -1,6 +1,6 @@ --- id: 587d7b86367417b2b2512b3d -title: Запобігання безкінечним циклам дійсною кінцевою умовою +title: Запобігання нескінченного циклу з дійсною кінцевою умовою challengeType: 1 forumTopicId: 301192 dashedName: prevent-infinite-loops-with-a-valid-terminal-condition @@ -8,9 +8,9 @@ dashedName: prevent-infinite-loops-with-a-valid-terminal-condition # --description-- -Остання тема - це безкінечний цикл, який багатьох жахає. Цикли є чудовими інструментами, коли вам необхідно, щоб ваша програма виконувала блок коду певну кількість разів, або поки умова не буде виконана, але їм також потрібна кінцева умова, яка закінчить цикл. Нескінченні цикли можуть призвести до блокування або збоїв у роботі браузера, чого кожен прагнув би уникнути. +Остання тема – нескінченний цикл, який багатьох лякає. Цикли є чудовими інструментами, якщо вам необхідно, щоб програма виконувала блок коду певну кількість разів або поки умова не буде виконана, але їм також потрібна кінцева умова, яка закінчить цикл. Нескінченні цикли можуть призвести до блокування або збоїв у роботі браузера, чого кожен прагнув би уникнути. -У вступі до цього розділу був приклад нескінченного циклу - у нього немає кінцевої умови для того, щоб вибратися з циклу `while` всередині `loopy()`. НЕ викликайте цю функцію! +У вступі до цього розділу був приклад нескінченного циклу: у ньому немає кінцевої умови для того, щоб закінчити цикл `while` всередині `loopy()`. НЕ викликайте цю функцію! ```js function loopy() { @@ -20,11 +20,11 @@ function loopy() { } ``` -Завданням програми є гарантувати, що кінцева умова, яка вказує програмі на момент розірвання коду циклу, нарешті досягнута. Одна помилка може зменшити або збільшити змінну лічильника у неправильному від кінцевої умови напрямку. Інша ж може випадково скинути дані лічильника чи змінну індексу всередині самого циклу замість його збільшення чи зменшення. +Завданням програміста – гарантувати, що кінцева умова, яка вказує програмі на кінець циклу, буде досягнута. Одна помилка полягає в збільшенні або зменшенні змінної лічильника в неправильному напрямку від кінцевої умови. Іншою помилкою є випадкове скидання змінної лічильника або індексу всередині циклу замість збільшення або зменшення. # --instructions-- -Функція `myFunc()` містить нескінченний цикл, оскільки кінцева умова `i != 4` ніколи не оцінюватиметься як `false` (та не розірве цикл) - `i` збільшуватиметься на 2 з кожним виконанням циклу і пропустить 4, оскільки `i` має бути непарним для початку запуску. Виправіть оператора порівняння у кінцевій умові так, щоб цикл виконувався лише якщо `i` менше або рівне 4. +Функція `myFunc()` містить нескінченний цикл, оскільки кінцева умова `i != 4` ніколи не буде `false` (та не закінчить цикл): `i` збільшуватиметься на 2 при кожному виконанні та пропустить 4, оскільки `i` має бути непарним числом. Виправте оператор порівняння у кінцевій умові так, щоб цикл виконувався лише за умови, що `i` менше або дорівнює 4. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/use-caution-when-reinitializing-variables-inside-a-loop.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/use-caution-when-reinitializing-variables-inside-a-loop.md index f9bac61075e..cb7e925429c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/use-caution-when-reinitializing-variables-inside-a-loop.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/debugging/use-caution-when-reinitializing-variables-inside-a-loop.md @@ -1,6 +1,6 @@ --- id: 587d7b86367417b2b2512b3c -title: Будьте обережні при реініціалізації змінних всередині циклу +title: Реініціалізація змінних всередині циклу challengeType: 1 forumTopicId: 301194 dashedName: use-caution-when-reinitializing-variables-inside-a-loop @@ -8,17 +8,17 @@ dashedName: use-caution-when-reinitializing-variables-inside-a-loop # --description-- -Часом буває необхідно зберегти інформацію, збільшити лічильники чи перевстановити змінні всередині самого циклу. Проблема може виникнути, що змінні або повинні бути реініціалізовані, але ще не були реініціалізовані, або ж навпаки. Це особливо небезпечно, якщо ви випадково скинули змінну, яка використовується в кінцевій умові, що може спричинити появу нескінченного циклу. +Іноді потрібно зберегти інформацію, збільшити лічильники чи перевстановити змінні всередині циклу. Потенційна проблема полягає в тому, що змінні повинні бути повторно ініціалізовані, а насправді не є такими, або навпаки. Це особливо небезпечно, якщо ви випадково скинули змінну, яка використовується в кінцевій умові, що може спричинити появу нескінченного циклу. -Виявити помилки, які можуть повторюватися в результаті скидання або невдалих спроб скинути змінну, можливо виведенням значень змінних на екран кожного повторення циклу, використовуючи функцію `console.log()`. +Ви можете виявити помилкову поведінку, пов’язану зі скиданням змінної, надрукувавши значення змінної після кожного виконання циклу за допомогою `console.log()`. # --instructions-- -Подана нижче функція повинна створити двовимірний масив із `m` рядків та `n` стовпців з нулів. На жаль, вона не має очікуваного результату, оскільки змінна `row` не реініціалізована (встановлена на порожньому масиві) у зовнішньому циклі. Виправіть код так, щоб він повертав правильний 3x2 масив з нулів, який повинен мати такий вигляд: `[[0, 0], [0, 0], [0, 0]]`. +Подана нижче функція повинна створити двовимірний масив із `m` рядками та `n` стовпцями з нулів. На жаль, вона не виводить очікуваний результат, оскільки змінна `row` не реініціалізована (встановлена на порожній масив) у зовнішньому циклі. Виправте код так, щоб він повертав правильний 3x2 масив з нулів, який повинен мати такий вигляд: `[[0, 0], [0, 0], [0, 0]]`. # --hints-- -Ваш код повинен встановити змінну `matrix` у масиві, що містить 3 рядки з 2 стовпців нулів кожен. +Ваш код повинен встановити змінну `matrix` на масив, що містить 3 рядки по 2 стовпці кожен. ```js assert(JSON.stringify(matrix) == '[[0,0],[0,0],[0,0]]'); @@ -38,7 +38,7 @@ assert( ); ``` -`zeroArray(4,3)` повинен повернути масив, який містить 4 рядки з 3 стовпців нулів кожен. +`zeroArray(4,3)` має повертати масив, який містить 4 рядки по 3 стовпці кожен. ```js assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md index d432ffe3acd..19eafc063bb 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/use-the-rest-parameter-with-function-parameters.md @@ -67,7 +67,11 @@ assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); ```js const sum = (x, y, z) => { const args = [x, y, z]; - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` @@ -75,6 +79,10 @@ const sum = (x, y, z) => { ```js const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); + let total = 0; + for (let i = 0; i < args.length; i++) { + total += args[i]; + } + return total; } ``` diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.md index d9b7f4f5afd..4bfa33ebf00 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.md @@ -10,7 +10,7 @@ dashedName: sum-all-odd-fibonacci-numbers Маючи додатнє ціле число `num`, поверніть суму всіх непарних чисел Фібоначчі, які менші чи дорівнюють `num`. -The first two numbers in the Fibonacci sequence are 0 and 1. Кожне додаткове число у послідовності є сумою двох попередніх чисел. The first seven numbers of the Fibonacci sequence are 0, 1, 1, 2, 3, 5 and 8. +Першими двома числами в послідовності Фібоначчі є 0 та 1. Кожне додаткове число у послідовності є сумою двох попередніх чисел. Першими сімома числами в послідовності Фібоначчі є 1, 1, 2, 3, 5 і 8. Наприклад, `sumFibs(10)` має повертати `10`, оскільки всі непарні числа Фібоначчі, які менші або дорівнюють `10` – це 1, 1, 3 і 5. diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object.md index 107f74e1fd7..d687a12ee57 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object.md @@ -29,7 +29,7 @@ duck.sayName(); # --hints-- -`dog.sayLegs()` повинен бути функцією. +`dog.sayLegs()` має бути функцією. ```js assert(typeof dog.sayLegs === 'function'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md index a51ed26ea72..87d6a5a0921 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.md @@ -25,7 +25,7 @@ console.log(duck.numLegs); console.log(canary.numLegs); ``` -Оскільки всі екземпляри автоматично мають властивості `prototype`, подумайти про `prototype` як "рецепт" для створення об'єктів. Зверніть увагу, що`prototype` `duck` і `canary` є частиною конструктора `Bird` як `Bird.prototype`. Майже кожен об'єкт в JavaScript має властивість`prototype`, яка є частиною створеної функції конструктора. +Оскільки всі екземпляри автоматично мають властивості `prototype`, подумайти про `prototype` як "рецепт" для створення об'єктів. Зверніть увагу, що`prototype` `duck` і `canary` є частиною конструктора `Bird` як `Bird.prototype`. # --instructions-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md index 10aa0940b53..fda73d047ad 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md @@ -96,14 +96,14 @@ reRegex.lastIndex = 0; assert(reRegex.test('10 10 10')); ``` -Your regex should not match the string `42\t42\t42`. +Регулярний вираз не повинен збігатися з рядком `42\t42\t42`. ```js reRegex.lastIndex = 0; assert(!reRegex.test('42\t42\t42')); ``` -Your regex should not match the string `42 42 42`. +Регулярний вираз не повинен збігатися з рядком `42 42 42`. ```js reRegex.lastIndex = 0; diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/extract-state-logic-to-redux.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/extract-state-logic-to-redux.md index b518b282962..d99e4b184bf 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/extract-state-logic-to-redux.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/extract-state-logic-to-redux.md @@ -35,7 +35,7 @@ assert( ); ``` -`messageReducer` повинно бути функцією. +`messageReducer` має бути функцією. ```js assert(typeof messageReducer === 'function'); diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/map-dispatch-to-props.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/map-dispatch-to-props.md index cf3be290e25..2f6a4eb0cb9 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/map-dispatch-to-props.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/map-dispatch-to-props.md @@ -40,7 +40,7 @@ assert( ); ``` -`mapDispatchToProps` повинна бути функцією. +`mapDispatchToProps` має бути функцією. ```js assert(typeof mapDispatchToProps === 'function'); diff --git a/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/map-state-to-props.md b/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/map-state-to-props.md index 572bb58d412..88d73f44837 100644 --- a/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/map-state-to-props.md +++ b/curriculum/challenges/ukrainian/03-front-end-development-libraries/react-and-redux/map-state-to-props.md @@ -26,7 +26,7 @@ The const `state` має бути порожнім масивом. assert(Array.isArray(state) && state.length === 0); ``` -`mapStateToProps` повинна бути функцією. +`mapStateToProps` має бути функцією. ```js assert(typeof mapStateToProps === 'function'); diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md index 43b46c0be7e..b2324aa6299 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/mongodb-and-mongoose/create-a-model.md @@ -28,19 +28,15 @@ const someFunc = function(done) { # --instructions-- -Створіть особисту схему під назвою `personSchema`, яка має такий прототип: +Create a person schema called `personSchema` with the following shape: -```markup -- Person Prototype - --------------------- -name : string [required] -age : number -favoriteFoods : array of strings (*) -``` +* A required `name` field of type `String` +* An `age` field of type `Number` +* A `favouriteFoods` field of type `[String]` Використайте основні типи схем Mongoose. Якщо ви хочете, то також можете додати більше полів, використати прості валідатори (наприклад, обов’язкові або унікальні) і встановити значення за замовчуванням. Див. нашу <a href="https://www.freecodecamp.org/news/introduction-to-mongoose-for-mongodb-d2a7aa593c57/" target="_blank" rel="noopener noreferrer nofollow">публікацію про Mongoose</a>. -Тепер створіть модель під назвою `Person` з `personSchema`. +Now, create a model from the `personSchema` and assign it to the existing variable `Person`. # --hints-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/find-the-symmetric-difference.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/find-the-symmetric-difference.md index e8acf0f264d..04411707dca 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/find-the-symmetric-difference.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/find-the-symmetric-difference.md @@ -18,7 +18,7 @@ dashedName: find-the-symmetric-difference # --hints-- -`sym([1, 2, 3], [5, 2, 1, 4])` повинен повертатися як `[3, 4, 5]`. +`sym([1, 2, 3], [5, 2, 1, 4])` має повернути `[3, 4, 5]`. ```js assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4]), [3, 4, 5]); @@ -30,7 +30,7 @@ assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4]), [3, 4, 5]); assert.equal(sym([1, 2, 3], [5, 2, 1, 4]).length, 3); ``` -`sym([1, 2, 3, 3], [5, 2, 1, 4])` повинен повертатися як `[3, 4, 5]`. +`sym([1, 2, 3, 3], [5, 2, 1, 4])` має повернути `[3, 4, 5]`. ```js assert.sameMembers(sym([1, 2, 3, 3], [5, 2, 1, 4]), [3, 4, 5]); @@ -42,7 +42,7 @@ assert.sameMembers(sym([1, 2, 3, 3], [5, 2, 1, 4]), [3, 4, 5]); assert.equal(sym([1, 2, 3, 3], [5, 2, 1, 4]).length, 3); ``` -`sym([1, 2, 3], [5, 2, 1, 4, 5])` повинен повертатися як `[3, 4, 5]`. +`sym([1, 2, 3], [5, 2, 1, 4, 5])` має повернути `[3, 4, 5]`. ```js assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4, 5]), [3, 4, 5]); @@ -66,7 +66,7 @@ assert.sameMembers(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5]); assert.equal(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).length, 3); ``` -`sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])` повинен повертатися як `[1, 4, 5]`. +`sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])` має повернути `[1, 4, 5]`. ```js assert.sameMembers(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5]); @@ -78,7 +78,7 @@ assert.sameMembers(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5]); assert.equal(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).length, 3); ``` -`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])` повинен повертатися як `[2, 3, 4, 6, 7]`. +`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])` має повернути `[2, 3, 4, 6, 7]`. ```js assert.sameMembers( @@ -96,7 +96,7 @@ assert.equal( ); ``` -`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])` повинен повертатися як `[1, 2, 4, 5, 6, 7, 8, 9]`. +`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])` має повернути `[1, 2, 4, 5, 6, 7, 8, 9]`. ```js assert.sameMembers( diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-binary-search.md index d54e939ca81..4352797a6f3 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -44,44 +44,44 @@ const testArray = [ assert(typeof binarySearch == 'function'); ``` -`binarySearch(testArray, 0)` should return `[13, 5, 2, 0]`. +`binarySearch(testArray, 0)` має повернути `[13, 5, 2, 0]`. ```js assert.deepEqual(binarySearch(_testArray, 0), [13, 5, 2, 0]); ``` -`binarySearch(testArray, 1)` should return `[13, 5, 2, 0, 1]`. +`binarySearch(testArray, 1)` має повернути `[13, 5, 2, 0, 1]`. ```js assert.deepEqual(binarySearch(_testArray, 1), [13, 5, 2, 0, 1]); ``` -`binarySearch(testArray, 2)` should return `[13, 5, 2]`. +`binarySearch(testArray, 2)` має повернути `[13, 5, 2]`. ```js assert.deepEqual(binarySearch(_testArray, 2), [13, 5, 2]); ``` -`binarySearch(testArray, 6)` should return the string `Value Not Found`. +`binarySearch(testArray, 6)` має повернути рядок `Value Not Found`. ```js assert.strictEqual(binarySearch(_testArray, 6), 'Value Not Found'); ``` -`binarySearch(testArray, 11)` should return `[13, 5, 10, 11]`. +`binarySearch(testArray, 11)` має повернути `[13, 5, 10, 11]`. ```js assert.deepEqual(binarySearch(_testArray, 11), [13, 5, 10, 11]) ``` -`binarySearch(testArray, 13)` should return `[13]`. +`binarySearch(testArray, 13)` має повернути `[13]`. ```js assert.deepEqual(binarySearch(_testArray, 13), [13]); ``` -`binarySearch(testArray, 70)` should return `[13, 19, 22, 49, 70]`. +`binarySearch(testArray, 70)` має повернути `[13, 19, 22, 49, 70]`. ```js assert.deepEqual(binarySearch(_testArray, 70), [13, 19, 22, 49, 70]); diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-bubble-sort.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-bubble-sort.md index 6b587568f26..a2e6882015d 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-bubble-sort.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-bubble-sort.md @@ -24,7 +24,7 @@ dashedName: implement-bubble-sort assert(typeof bubbleSort == 'function'); ``` -`bubbleSort` повертає відсортований масив (як мінімум до найбільшого). +`bubbleSort` має повернути впорядкований масив (від найменшого до найбільшого). ```js assert( @@ -52,7 +52,7 @@ assert( ); ``` -`bubbleSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])` повертає масив без змін, окрім послідовності. +`bubbleSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])` має повернути масив без змін, окрім послідовності. ```js assert.sameMembers( diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-insertion-sort.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-insertion-sort.md index a749489d50d..81f6dd63869 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-insertion-sort.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-insertion-sort.md @@ -20,7 +20,7 @@ dashedName: implement-insertion-sort assert(typeof insertionSort == 'function'); ``` -`insertionSort` має повернути впорядкований масив (від меншого до більшого). +`insertionSort` має повернути впорядкований масив (від найменшого до найбільшого). ```js assert( diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-merge-sort.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-merge-sort.md index 19432130dd4..088d1d6df0b 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-merge-sort.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-merge-sort.md @@ -22,13 +22,13 @@ dashedName: implement-merge-sort # --hints-- -`mergeSort` повинен бути функцією. +`mergeSort` має бути функцією. ```js assert(typeof mergeSort == 'function'); ``` -`mergeSort` повинен повертати відсортований масив (від найменшого до найбільшого). +`mergeSort` має повернути впорядкований масив (від найменшого до найбільшого). ```js assert( @@ -56,7 +56,7 @@ assert( ); ``` -`mergeSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])` повинен повернути масив без змін, крім послідовності. +`mergeSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])` має повернути масив без змін, окрім послідовності. ```js assert.sameMembers( diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-quick-sort.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-quick-sort.md index b1267a77220..f54ae69e9de 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-quick-sort.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-quick-sort.md @@ -16,13 +16,13 @@ dashedName: implement-quick-sort # --hints-- -`quickSort` повинен бути функцією. +`quickSort` має бути функцією. ```js assert(typeof quickSort == 'function'); ``` -`quickSort` повинен повертати відсортований масив (від найменшого до найбільшого). +`quickSort` має повернути впорядкований масив (від найменшого до найбільшого). ```js assert( @@ -50,7 +50,7 @@ assert( ); ``` -`quickSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])` повинен повернути масив без змін, крім послідовності. +`quickSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])` має повернути масив без змін, окрім послідовності. ```js assert.sameMembers( diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/no-repeats-please.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/no-repeats-please.md index 29ef0e4db9b..2e9dc7d0828 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/no-repeats-please.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/no-repeats-please.md @@ -62,13 +62,13 @@ assert.strictEqual(permAlone('zzzzzzzz'), 0); assert.strictEqual(permAlone('a'), 1); ``` -`permAlone("aaab")` має повертати 0. +`permAlone("aaab")` має повернути 0. ```js assert.strictEqual(permAlone('aaab'), 0); ``` -`permAlone("aaabb")` має повертати 12. +`permAlone("aaabb")` має повернути 12. ```js assert.strictEqual(permAlone('aaabb'), 12); diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 8c7b7d9f681..436b9ac3e8b 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,7 +9,7 @@ dashedName: step-31 Одиниця `rem` розшифровується як `root em` та залежить від розміру шрифту елемента `html`. -Створіть селектор `.small-text` та встановіть `font-size` на `0.85rem`, що дорівнюватиме приблизно `13.6px` (пам’ятайте, що для свого `html` ви встановили `font-size` зі значенням `16px`). +Create a `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md index b3fdd711942..21c18546b04 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md @@ -7,140 +7,140 @@ dashedName: step-1 # --description-- -JavaScript is a powerful language which allows you to build websites that are interactive. +JavaScript – це потужна мова, яка дозволяє створювати інтерактивні вебсайти. -To get started, create your standard HTML boilerplate with a `DOCTYPE`, `html`, `head`, and `body`, then add a `meta` tag for the `charset`. Add a `title` element and use the text `RPG - Dragon Repeller` for it. Include a `link` tag for your stylesheet to link the `styles.css` file. +Для початку створіть стандартний шаблон HTML з `DOCTYPE`, `html`, `head` та `body`, а потім додайте тег `meta` для `charset`. Додайте елемент `title` та використайте для нього текст `RPG - Dragon Repeller`. Не забудьте тег `link` для таблиці стилів, щоб додати файл `styles.css`. -Finally, create a `div` element with `id` set to `game` within your `body`. +Наприкінці створіть елемент `div`, що має `id` зі значенням `game`, в межах `body`. # --hints-- -Your code should contain the `DOCTYPE` reference. +Ваш код повинен містити посилання `DOCTYPE`. ```js assert(code.match(/<!DOCTYPE/gi)); ``` -You should include a space after the `DOCTYPE` reference. +Ви повинні додати пробіл після посилання `DOCTYPE`. ```js assert(code.match(/<!DOCTYPE\s+/gi)); ``` -You should define the document type to be `html`. +Ви повинні визначити тип документа як `html`. ```js assert(code.match(/<!DOCTYPE\s+html/gi)); ``` -You should close the `DOCTYPE` declaration with a `>` after the type. +Ви повинні закрити декларацію `DOCTYPE` за допомогою `>` після типу. ```js assert(code.match(/<!DOCTYPE\s+html\s*>/gi)); ``` -Your `html` element should have an opening tag. Don't forget the `lang` attribute. +Ваш елемент `html` повинен мати початковий теґ. Не забудьте атрибут `lang`. ```js assert(code.match(/<html\s+lang\s*=\s*('|")en\1\s*>/gi)); ``` -Your `html` element should have a closing tag. +Ваш елемент `html` повинен мати кінцевий теґ. ```js assert(code.match(/<\/html\s*>/)); ``` -Your `DOCTYPE` declaration should be at the beginning of your HTML. +Ваша декларація `DOCTYPE` повинна бути на початку HTML. ```js assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i)); ``` -You should have an opening `head` tag. +Ви повинні мати початковий теґ `head`. ```js assert(code.match(/<head\s*>/i)); ``` -You should have a closing `head` tag. +Ви повинні мати кінцевий теґ `head`. ```js assert(code.match(/<\/head\s*>/i)); ``` -You should have an opening `body` tag. +Ви повинні мати початковий теґ `body`. ```js assert(code.match(/<body\s*>/i)); ``` -You should have a closing `body` tag. +Ви повинні мати кінцевий теґ `body`. ```js assert(code.match(/<\/body\s*>/i)); ``` -The `head` and `body` elements should be siblings. +Елементи `head` та `body` повинні бути братськими. ```js assert(document.querySelector('head')?.nextElementSibling?.localName === 'body'); ``` -The `head` element should be within the `html` element. +Елемент `head` повинен бути в межах елемента `html`. ```js assert([...document.querySelector('html')?.children].some(x => x?.localName === 'head')); ``` -The `body` element should be within the `html` element. +Елемент `body` повинен бути в межах елемента `html`. ```js assert([...document.querySelector('html')?.children].some(x => x?.localName === 'body')); ``` -Your code should have a `meta` element. +Ваш код повинен мати елемент `meta`. ```js const meta = document.querySelector('meta'); assert.exists(meta); ``` -Your `meta` element should have a `charset` attribute with the value `UTF-8`. +Ваш елемент `meta` повинен мати атрибут `charset` зі значенням `UTF-8`. ```js assert.match(code, /<meta[\s\S]+?charset=('|"|`)UTF-8\1/i) ``` -Your code should have a `title` element. +Ваш код повинен мати елемент `title`. ```js const title = document.querySelector('title'); assert.exists(title); ``` -Your code should have a `link` element. +Ваш код повинен мати елемент `link`. ```js const link = document.querySelector('head > link'); assert.exists(link); ``` -You should have a `div` element. +Ви повинні мати елемент `div`. ```js const div = document.querySelector('div'); assert.exists(div); ``` -Your `div` element should have an `id` attribute with the value `game`. +Ваш елемент `div` повинен мати атрибут `id` зі значенням `game`. ```js const div = document.querySelector('div'); assert.equal(div?.id, 'game'); ``` -Your `div` element should be within the `body` element. +Ваш елемент `div` повинен бути в межах елемента `body`. ```js const div = document.querySelector('div'); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md index b38a05ed01e..9f3e2a48e7d 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md @@ -7,7 +7,7 @@ dashedName: step-10 # --description-- -Надайте `#game` максимальної ширини зі значенням `500px` та максимальної висоти зі значенням `400px`. Встановіть `background-color` на `lightgray` та `color` на `white`. Use margins to center it by setting the top and bottom margin to `0`, and the left and right margin to `auto`. Finally, give it `10px` of padding on all four sides. +Надайте `#game` максимальної ширини зі значенням `500px` та максимальної висоти зі значенням `400px`. Встановіть `background-color` на `lightgray` та `color` на `white`. Використайте поля, щоб відцентрувати його, встановивши верхнє та нижнє поле на `0`, а ліве та праве на `auto`. Також надайте йому відступ зі значенням `10px` на всіх сторонах. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md index a984a6b7e7a..281fd4aa9af 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md @@ -7,7 +7,7 @@ dashedName: step-13 # --description-- -For now, hide your `#monsterStats` element with the `display` property. Не змінюйте жодного іншого стилю. +Наразі приховайте елемент `#monsterStats` з властивістю `display`. Не змінюйте жодного іншого стилю. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index 51a8e01e834..97b9081f345 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -7,7 +7,7 @@ dashedName: step-16 # --description-- -Одним із найпотужніших інструментів є ваша консоль розробника. Її можна відкрити за допомогою `F12` або `Ctrl+Shift+I`, залежно від вашого браузера. On Mac, you can press `Option + ⌘ + C` and select "Console". Ви також можете натиснути кнопку «Консоль» над вікном попереднього перегляду, щоб побачити нашу вбудовану консоль. +Одним із найпотужніших інструментів є ваша консоль розробника. Її можна відкрити за допомогою `F12` або `Ctrl+Shift+I`, залежно від вашого браузера. На Mac ви можете натиснути `Option + ⌘ + C` та обрати «Консоль». Ви також можете натиснути кнопку «Консоль» над вікном попереднього перегляду, щоб побачити нашу вбудовану консоль. Консоль розробника включатиме помилки, створені вашим кодом, але ви також можете використовувати її, щоб переглянути значення змінних у своєму коді, що корисно для налагодження. diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md index e79b96f959b..3b643035045 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a257659d0d1e2456f24ba2.md @@ -7,19 +7,19 @@ dashedName: step-17 # --description-- -Before you start writing your project code, you should move it to its own file to keep things organized. +Перш ніж почати писати код проєкту, вам потрібно перемістити його у власний файл, щоб все було організовано. -Remove your `console.log("Hello World");` line. Then give your now empty `script` element a `src` attribute set to `./script.js`. +Видаліть свій рядок `console.log("Hello World");`. Потім надайте своєму зараз порожньому елементу `script` атрибут `src` зі значенням `./script.js`. # --hints-- -You should not have a `console.log("Hello World");` line in your code. +Вам не потрібен рядок `console.log("Hello World");` у коді. ```js assert.notMatch(code, /console\.log\("Hello World"\);/); ``` -Your `script` element should have a `src` attribute set to `./script.js`. +Ваш елемент `script` повинен мати атрибут `src` зі значенням `./script.js`. ```js const script = document.querySelector("script[data-src$='script.js']"); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md index f250e421261..3bdc961f98d 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md @@ -13,19 +13,19 @@ dashedName: step-20 var camperbot = "Bot"; ``` -This would initialize the `camperbot` variable with a value of `Bot`, a string. +Це ініціалізує змінну `camperbot` зі значенням `Bot` (рядок). -Initialize your `xp` variable to have a value of `0`, a number. +Ініціалізуйте змінну `xp`, щоб вона мала значення `0` (число). # --hints-- -`xp` should have a value of `0`. +`xp` повинна мати значення `0`. ```js assert.equal(xp, 0); ``` -You should initialize the `xp` variable to `0`. Don't forget the semi-colon at the end of the line. +Вам потрібно ініціалізувати змінну `xp` до `0`. Не забудьте про крапку з комою в кінці рядка. ```js assert.match(code, /var\s+xp\s*=\s*0\s*;/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md index 975c87c7617..42c8c610871 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md @@ -15,41 +15,41 @@ let order = ["first", "second", "third"]; Це масив, який містить три значення. Зверніть увагу, що значення розділені комами. -Change your `inventory` variable to be an array with the strings `stick`, `dagger`, and `sword`. +Змініть свою змінну `inventory` так, щоб вона була масивом з рядками `stick`, `dagger` та `sword`. # --hints-- -Your `inventory` variable should be an array. +Ваша змінна `inventory` повинна бути масивом. ```js assert.isArray(inventory); ``` -Your `inventory` variable should have three values. +Ваша змінна `inventory` повинна мати три значення. ```js assert.lengthOf(inventory, 3); ``` -Your `inventory` variable should include the string `stick`. +Ваша змінна `inventory` повинна містити рядок `stick`. ```js assert.include(inventory, "stick"); ``` -Your `inventory` variable should include the string `dagger`. +Ваша змінна `inventory` повинна містити рядок `dagger`. ```js assert.include(inventory, "dagger"); ``` -Your `inventory` variable should include the string `sword`. +Ваша змінна `inventory` повинна містити рядок `sword`. ```js assert.include(inventory, "sword"); ``` -Your `inventory` variable should have the values in the correct order. +Ваша змінна `inventory` повинна мати значення в правильному порядку. ```js assert.deepEqual(inventory, ["stick", "dagger", "sword"]); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md index 3872292e9c8..772ecdba3a2 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md @@ -7,33 +7,33 @@ dashedName: step-29 # --description-- -JavaScript взаємодіє із HTML завдяки <dfn>об'єктній моделі документа</dfn>, або DOM. DOM – це дерево об'єктів, які представляють HTML. You can access the HTML using the `document` object, which represents your entire HTML document. +JavaScript взаємодіє із HTML завдяки <dfn>об’єктній моделі документа</dfn>, або DOM. DOM – це дерево об’єктів, які представляють HTML. Ви можете отримати доступ до HTML завдяки об’єкту `document`, який являє собою весь документ HTML. -Один спосіб для пошуку конкретних елементів у HTML – це використати метод `querySelector()`. Метод `querySelector()` приймає CSS-селектор як аргумент та повертає перший елемент, який відповідає селектору. Наприклад, щоб знайти елемент `<h1>` у своєму HTML, ви б написали: +Один зі способів пошуку конкретних елементів у HTML – використати метод `querySelector()`. Метод `querySelector()` приймає CSS-селектор як аргумент та повертає перший елемент, який відповідає селектору. Наприклад, щоб знайти елемент `<h1>` у своєму HTML, ви б написали: ```js let h1 = document.querySelector("h1"); ``` -Note that `h1` is a string and matches the CSS selector you would use. +Зауважте, що `h1` є рядком і відповідає CSS-селектору, який ви б використали. -Create a `button1` variable and use `querySelector()` to assign it your element with the `id` of `button1`. Remember that CSS `id` selectors are prefixed with a `#`. +Створіть змінну `button1` та використайте `querySelector()`, щоб присвоїти елемент з `id` зі значенням `button1` до неї. Пам'ятайте, що `id` CSS-селекторів розпочинається з `#`. # --hints-- -You should use `let` to declare a `button1` variable. +Ви повинні використати `let`, щоб оголосити змінну `button1`. ```js assert.match(code, /let button1/); ``` -You should use `document.querySelector()`. +Ви повинні використати `document.querySelector()`. ```js assert.match(code, /document\.querySelector/); ``` -You should use the `#button1` selector. +Ви повинні використати селектор `#button1`. ```js assert.match(code, /querySelector\(('|")#button1\1\)/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md index b193238b243..463b54b5e50 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md @@ -9,7 +9,7 @@ dashedName: step-36 `button1` представляє ваш перший елемент `button`. Ці елементи мають спеціальну властивість під назвою `onclick`, яку можна використати для того, щоб визначити, що буде при натисканні на кнопку. -You can access properties in JavaScript a couple of different ways. The first is with <dfn>dot notation</dfn>. Accessing the `onclick` property of a button would look like: +Ви можете отримати доступ до властивостей в JavaScript різними способами. Першим є <dfn>точкова нотація</dfn>. Отримання доступу до властивості кнопки `onclick` виглядатиме так: ```js button.onclick diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c668afc43b4a134cca81.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c668afc43b4a134cca81.md index 1ce694f6ef8..43acc178124 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c668afc43b4a134cca81.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c668afc43b4a134cca81.md @@ -31,13 +31,13 @@ assert.match(code, /function\s*goStore()/); assert.isDefined(goStore); ``` -`goStore` повинна бути функцією. +`goStore` має бути функцією. ```js assert.isFunction(goStore); ``` -`goStore` повинна бути порожньою функцією. +`goStore` має бути порожньою функцією. ```js assert.equal(goStore.toString(), "function goStore() {}"); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md index ac7d3f341cd..6e3d88259bc 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md @@ -7,7 +7,7 @@ dashedName: step-43 # --description-- -Now, add a line that updates the text of `button2` to say `Buy weapon (30 gold)` and update the text of `button3` to say `Go to town square`. +Тепер додайте рядок, який оновлює текст `button2` на `Buy weapon (30 gold)` та оновіть текст `button3` на `Go to town square`. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md index 91d8f520024..be3cb5cf39e 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md @@ -7,79 +7,79 @@ dashedName: step-44 # --description-- -You will also need to update the functions that run when the buttons are clicked again. +Вам також потрібно буде оновити функції, які будуть виконуватись, якщо знову натиснути на кнопку. -In your `goStore()` function, update the `onclick` property for each button to run `buyHealth`, `buyWeapon`, and `goTown`, respectively. +У своїй функції `goStore()` оновіть властивість `onclick` для кожної кнопки, щоб відповідно запустити `buyHealth`, `buyWeapon` та `goTown`. # --hints-- -You should use dot notation to access the `onclick` property of `button1`. +Ви повинні використати крапкову нотацію, щоб отримати доступ до властивості `onclick` для `button1`. ```js assert.match(code, /button1\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button1`. +Ви не повинні використовувати `let` чи `const` для доступу до властивості `onclick` для `button1`. ```js assert.notMatch(code, /(let|const)\s+button1.onclick/); ``` -You should set the `onclick` property of `button1` to be `buyHealth`. +Ви повинні встановити властивість `onclick` для `button1` на `buyHealth`. ```js assert.match(code, /button1\.onclick\s*=\s*buyHealth/); ``` -You should set the `onclick` property of `button1` in your `goStore` function. +Ви повинні встановити властивість `onclick` для `button1` у своїй функції `goStore`. ```js assert.match(goStore.toString(), /button1\.onclick\s*=\s*buyHealth/); ``` -You should use dot notation to access the `onclick` property of `button2`. +Ви повинні використати крапкову нотацію, щоб отримати доступ до властивості `onclick` для `button2`. ```js assert.match(code, /button2\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button2`. +Ви не повинні використовувати `let` чи `const` для доступу до властивості `onclick` для `button2`. ```js assert.notMatch(code, /(let|const)\s+button2.onclick/); ``` -You should set the `onclick` property of `button2` to be `buyWeapon`. +Ви повинні встановити властивість `onclick` для `button2` на `buyWeapon`. ```js assert.match(code, /button2\.onclick\s*=\s*buyWeapon/); ``` -You should set the `onclick` property of `button2` in your `goStore` function. +Ви повинні встановити властивість `onclick` для `button2` у своїй функції `goStore`. ```js assert.match(goStore.toString(), /button2\.onclick\s*=\s*buyWeapon/); ``` -You should use dot notation to access the `onclick` property of `button3`. +Ви повинні використати крапкову нотацію, щоб отримати доступ до властивості `onclick` для `button3`. ```js assert.match(code, /button3\.onclick/); ``` -You should not use `let` or `const` to access the `onclick` property of `button3`. +Ви не повинні використовувати `let` чи `const` для доступу до властивості `onclick` для `button3`. ```js assert.notMatch(code, /(let|const)\s+button3.onclick/); ``` -You should set the `onclick` property of `button3` to be `goTown`. +Ви повинні встановити властивість `onclick` для `button3` на `goTown`. ```js assert.match(code, /button3\.onclick\s*=\s*goTown/); ``` -You should set the `onclick` property of `button3` in your `goStore` function. +Ви повинні встановити властивість `onclick` для `button3` у своїй функції `goStore`. ```js assert.match(goStore.toString(), /button3\.onclick\s*=\s*goTown/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md index 6debd11c9ae..75336549e75 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md @@ -7,49 +7,49 @@ dashedName: step-48 # --description-- -In your `goTown` function, change your `button` elements' `innerText` properties to be `Go to store`, `Go to cave`, and `Fight dragon`. Оновіть значення `onclick` на `goStore`, `goCave` та `fightDragon`. +У своїй функції `goTown` змініть властивості `innerText` елементів `button` на `Go to store`, `Go to cave` та `Fight dragon`. Оновіть значення `onclick` на `goStore`, `goCave` та `fightDragon`. -Finally, update your text's `innerText` property to be `You are in the town square. You see a sign that says Store.`. +Зрештою, оновіть властивість тексту `innerText` на `You are in the town square. You see a sign that says Store.`. # --hints-- -You should set the `button1.innerText` property to be `Go to store` in your `goTown` function. +Ви повинні встановити властивість `button1.innerText` на `Go to store` у своїй функції `goTown`. ```js assert.match(goTown.toString(), /button1\.innerText\s*=\s*('|")Go to store\1/); ``` -You should set the `button2.innerText` property to be `Go to cave` in your `goTown` function. +Ви повинні встановити властивість `button2.innerText` на `Go to cave` у своїй функції `goTown`. ```js assert.match(goTown.toString(), /button2\.innerText\s*=\s*('|")Go to cave\1/); ``` -You should set the `button3.innerText` property to be `Fight dragon` in your `goTown` function. +Ви повинні встановити властивість `button3.innerText` на `Fight dragon` у своїй функції `goTown`. ```js assert.match(goTown.toString(), /button3\.innerText\s*=\s*('|")Fight dragon\1/); ``` -You should set the `button1.onclick` property to be `goStore` in your `goTown` function. +Ви повинні встановити властивість `button1.onclick` на `goStore` у своїй функції `goTown`. ```js assert.match(goTown.toString(), /button1\.onclick\s*=\s*goStore/); ``` -You should set the `button2.onclick` property to be `goCave` in your `goTown` function. +Ви повинні встановити властивість `button2.onclick` на `goCave` у своїй функції `goTown`. ```js assert.match(goTown.toString(), /button2\.onclick\s*=\s*goCave/); ``` -You should set the `button3.onclick` property to be `fightDragon` in your `goTown` function. +Ви повинні встановити властивість `button3.onclick` на `fightDragon` у своїй функції `goTown`. ```js assert.match(goTown.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -You should set the `text.innerText` property to be `You are in the town square. You see a sign that says Store.` in your `goTown` function. +Ви повинні встановити властивість `text.innerText` на `You are in the town square. You see a sign that says Store.` у своїй функції `goTown`. ```js assert.match(goTown.toString(), /text\.innerText\s*=\s*('|")You are in the town square. You see a sign that says Store\.\1/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md index 13ccb6c5145..e259e391c2d 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md @@ -11,17 +11,17 @@ dashedName: step-52 Об’єкти позначаються фігурними дужками. Порожній об’єкт матиме вигляд `{}`. -Add an empty object to your `locations` array. +Додайте порожній об’єкт до свого масиву `locations`. # --hints-- -Your first value of `locations` should be an object. +Першим значенням `locations` повинен бути об’єкт. ```js assert.isObject(locations[0]); ``` -Your first value of `locations` should be an empty object. +Першим значенням `locations` повинен бути порожній об’єкт. ```js assert.deepEqual(locations[0], {}); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md index aae9b1bce5e..48999c9cc86 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md @@ -9,7 +9,7 @@ dashedName: step-54 Так само як і значення масиву, властивості об'єктів розділені комою. Додайте кому після властивості `name` та додайте властивість `button text` зі значенням пустого масиву. -Note that, because the property name has more than one word, you'll need to surround it in quotes. For example: +Зверніть увагу: оскільки ім’я властивості складається з більше ніж одного слова, його потрібно оточити лапками. Наприклад: ```js { diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md index 1505b8f33c1..341f318d0ce 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md @@ -9,7 +9,7 @@ dashedName: step-60 Замість того, щоб призначати властивості `innerText` та `onclick` певним рядкам і функціям, функція `update` використовуватиме дані з `location`, які передаються їй. По-перше, ці дані потрібно передати. -Inside the `goTown` function, call the `update` function. Here is an example of calling a function named `myFunction`: +Усередині функції `goTown` викличте функцію `update`. Ось приклад виклику функції під назвою `myFunction`: ```js myFunction(); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md index db853622539..371cd44273d 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md @@ -7,7 +7,7 @@ dashedName: step-61 # --description-- -Тепер вам потрібно передати аргумент `location` до виклику `update`. Ви передаєте аргументи, включаючи їх у парантезу виклику функції. For example, calling `myFunction` with an `arg` argument would look like: +Тепер вам потрібно передати аргумент `location` до виклику `update`. Ви передаєте аргументи, включаючи їх у парантезу виклику функції. Наприклад, виклик `myFunction` з аргументом `arg` виглядатиме так: ```js myFunction(arg) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index 7d1aae3b419..66b1b6ffbe7 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -9,31 +9,31 @@ dashedName: step-62 Масив `locations` містить дві локації: `town square` та `store`. Наразі ви передаєте цілий масив до функції `update`. -Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +Передайте лише перший елемент масиву `locations`, додавши `[0]` в кінці змінної. Наприклад: `myFunction(arg[0]);`. -This is called <dfn>bracket notation</dfn>. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. +Це називається <dfn>дужковою нотацією</dfn>. Значення в масиві доступні за індексом. Індекси є числовими значеннями та починаються з 0 – це називається індексуванням від нуля. Першим елементом у масиві `arg` був би `arg[0]`. # --hints-- -You should use bracket notation with `locations`. +Використайте дужкову нотацію з `locations`. ```js assert.match(code, /locations\[/); ``` -You should access the first object in the `locations` array. Remember that arrays are zero-based. +Ви повинні отримати доступ до першого об‘єкта у масиві `locations`. Пам’ятайте, що масиви починаються з нуля. ```js assert.match(code, /locations\[0\]/); ``` -You should pass the first object in the `locations` array into the `update` function. +Ви повинні передати перший об’єкт у масиві `locations` до функції `update`. ```js assert.match(code, /update\(locations\[0\]\);/); ``` -This call should still be in your `goTown()` function. +Цей виклик досі повинен бути у функції `goTown()`. ```js assert.match(goTown.toString(), /update\(locations\[0\]\);/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md index 6f2439cedc8..b98bcfa9203 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md @@ -7,19 +7,19 @@ dashedName: step-63 # --description-- -Now your `update` function needs to use the argument you pass into it. +Тепер ваша функція `update` повинна використовувати аргумент, який ви передали. -Inside the `update` function, change the value of the `button1.innerText` assignment to be `location["button text"]`. That way, you use bracket notation to get the `button text` property of the `location` object passed into the function. +Всередині функції `update` змініть значення присвоєння `button1.innerText` на `location["button text"]`. Дужкова нотація використана для того, щоб отримати властивість `button text` об’єкта `location`, переданого до функції. # --hints-- -Your `update` function should use bracket notation to get the `button text` property of the `location` object passed into the function. +Ваша функція `update` повинна використовувати дужкову нотацію, щоб отримати властивість `button text` об’єкта `location`, переданого до функції. ```js assert.match(update.toString(), /location[('|")button text\1]/); ``` -You should assign the value of the `button text` property of the `location` object to the `innerText` property of `button1`. +Ви повинні присвоїти значення властивості `button text` об’єкта `location` до властивості `innerText` для `button1`. ```js assert.match(update.toString(), /button1\.innerText\s*=\s*location\[('|")button text\1\]/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index 8faae35e754..ba42386081a 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -9,7 +9,7 @@ dashedName: step-67 Оновіть присвоєння `text.innerText`, щоб воно дорівнювало `text` об'єкта `location`. Але замість дужкової нотації використайте <dfn>крапкову нотацію</dfn>. -Here is an example of accessing the `name` property of an object called `person`: +Ось приклад отримання доступу до властивості `name` об’єкту під назвою `person`: ```js person.name diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md index ecc584bd401..189b63203c7 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md @@ -7,11 +7,11 @@ dashedName: step-75 # --description-- -Now that you are updating the `gold` and `health` variables, you need to display those new values on the game screen. +Ви оновлюєте змінні `gold` та `health`, і потрібно, щоб на екрані гри зображались нові значення. -After your assignment lines, assign the `innerText` property of `goldText` to be the variable `gold`. Use the same pattern to update `healthText` with the `health` variable. +Після рядків із присвоєнням призначте властивість `innerText` об’єкта `goldText` до змінної `gold`. Використайте той самий шаблон, щоб оновити `healthText` зі змінною `health`. -Here is an example: +Ось приклад: ```js let value = 100; @@ -19,9 +19,9 @@ const total = document.querySelector('#total'); total.innerText = value; ``` -You can test this by clicking your "Go to store" button, followed by your "Buy Health" button. +Це можна перевірити, натиснувши кнопку «Go to store», одразу після кнопки «Buy Health». -**Note:** Your answer should only be two lines of code. +**Примітка:** ваша відповідь повинна мати лише два рядки коду. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md index aa116dc2938..5ae9736991f 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md @@ -7,7 +7,7 @@ dashedName: step-78 # --description-- -Now when a player tries to buy health, it will only work if they have enough money. В іншому випадку нічого не станеться. Додайте інструкцію `else`, де ви можете розмістити код для запуску, якщо гравець не має достатньо грошей. +Тепер гравець може купити здоров’я лише тоді, коли має достатньо грошей. В іншому випадку нічого не станеться. Додайте інструкцію `else`, де ви можете розмістити код для запуску, якщо гравець не має достатньо грошей. Ось приклад пустої інструкції `else`: diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md index 66b82f05907..e0a0a66846f 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md @@ -9,7 +9,7 @@ dashedName: step-84 Значення змінної `currentWeapon` відповідає індексу в масиві `weapons`. Гравець починає із `stick`, оскільки `currentWeapon` розпочинається із `0` та `weapons[0]` є зброєю `stick`. -In the `buyWeapon` function, use compound assignment to add `1` to `currentWeapon` - the user is buying the next weapon in the `weapons` array. +У функції `buyWeapon` використайте складене присвоєння, щоб додати `1` до `currentWeapon`: користувач купляє наступну зброю у масиві `weapons`. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md index fc508fd547b..675a998ee45 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md @@ -7,7 +7,7 @@ dashedName: step-88 # --description-- -Use bracket notation to access an object within the `weapons` array and assign it to your `newWeapon` variable. Place the variable `currentWeapon` within the brackets. +Використайте дужкову нотацію, щоб отримати доступ до об’єкта в межах масиву `weapons` та присвойте його до змінної `newWeapon`. Розмістіть змінну `currentWeapon` у дужки. Коли ви використовуєте змінну в дужковій нотації, ви отримуєте доступ до властивості або індексу за *значенням* цієї змінної. diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md index bb42849cf71..18fd0843b20 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md @@ -7,26 +7,26 @@ dashedName: step-92 # --description-- -Up until now, any time `text.innerText` was updated, the old text was erased. Цього разу скористайтеся оператором `+=`, щоб додати текст у кінець `text.innerText`. +До цього моменту старий текст видалявся, коли `text.innerText` оновлювався. Цього разу скористайтеся оператором `+=`, щоб додати текст у кінець `text.innerText`. -Add the string `In your inventory you have:` - include the spaces at the beginning and the end. +Додайте рядок `In your inventory you have:`, не забудьте пробіли спочатку та вкінці. # --hints-- -You should add a new line with `text.innerText`. +Ви повинні додати новий рядок із `text.innerText`. ```js const matches = buyWeapon.toString().match(/text\.innerText/g); assert.lengthOf(matches, 2); ``` -You should use the `+=` operator to add to `text.innerText`. +Ви повинні використати оператор `+=`, щоб додати до `text.innerText`. ```js assert.match(buyWeapon.toString(), /text\.innerText\s*\+=\s*/) ``` -You should add the string `In your inventory you have:` to the end of `text.innerText`. Mind the spaces! +Ви повинні додати рядок `In your inventory you have:` в кінець `text.innerText`. Пам’ятайте про пробіли! ```js assert.match(buyWeapon.toString(), /text\.innerText\s*\+=\s*('|")\sIn your inventory you have:\s\1/) diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md index 4db9d5226a4..1d56dc458fe 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md @@ -9,17 +9,17 @@ dashedName: step-96 Масиви мають властивість `length`, яка повертає кількість об'єктів у масиві. У майбутньому вам доведеться додати нові значення до масиву `weapons`. -Change your `if` condition to check if `currentWeapon` is less than the length of the `weapons` array. An example of checking the length of an array `myArray` would look like `myArray.length`. +Змініть свою умову `if` так, щоб вона перевіряла, чи `currentWeapon` менше за довжину масиву `weapons`. Приклад визначення довжини масиву `myArray` виглядатиме як `myArray.length`. # --hints-- -You should use the `length` property on the `weapons` array. +Ви повинні використати властивість `length` для масиву `weapons`. ```js assert.match(buyWeapon.toString(), /weapons\.length/); ``` -Your `if` statement should check if `currentWeapon` is less than `weapons.length`. +Ваша інструкція `if` повинна перевіряти, чи `currentWeapon` менше за `weapons.length`. ```js assert.match(buyWeapon.toString(), /currentWeapon\s*<\s*weapons\.length/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md index 0a438385f31..1b2339adaf7 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md @@ -9,17 +9,17 @@ dashedName: step-97 Тепер у вас є помилка, яку потрібно виправити. Змінна `currentWeapon` є індексом масиву `weapons`, але індексування масиву починається з нуля. Індекс останнього елемента в масиві на один менший, ніж довжина масиву. -Change the `if` condition to check `weapons.length - 1`, instead of `weapons.length`. +Змініть умову `if` так, щоб вона перевіряла `weapons.length - 1` замість `weapons.length`. # --hints-- -You should update the condition to subtract `1` from `weapons.length`. +Ви повинні оновити умову так, щоб від `weapons.length` віднімалось `1`. ```js assert.match(buyWeapon.toString(), /weapons\.length\s*-\s*1/); ``` -Your condition should check if `currentWeapon` is less than `weapons.length - 1`. +Ваша умова повинна перевіряти, чи `currentWeapon` менше за `weapons.length - 1`. ```js assert.match(buyWeapon.toString(), /currentWeapon\s*<\s*weapons\.length\s*-\s*1/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md index feea358b290..67c07eb457a 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md @@ -7,31 +7,31 @@ dashedName: step-99 # --description-- -Once a player has the most powerful weapon, you can give them the ability to sell their old weapons. +Як тільки гравець отримає найпотужнішу зброю, ви можете дати йому можливість продати стару. -In the outer `else` statement, set `button2.innerText` to `Sell weapon for 15 gold`. Also set `button2.onclick` to the function name `sellWeapon`. +У зовнішній інструкції `else` встановіть `button2.innerText` на `Sell weapon for 15 gold`. Також встановіть `button2.onclick` на назву функції `sellWeapon`. # --hints-- -You should set the value of `button2.innerText`. +Ви повинні встановити значення `button2.innerText`. ```js assert.match(buyWeapon.toString(), /button2\.innerText/); ``` -You should set the value of `button2.innerText` to `Sell weapon for 15 gold`. +Ви повинні встановити значення `button2.innerText` на `Sell weapon for 15 gold`. ```js assert.match(buyWeapon.toString(), /button2\.innerText\s*=\s*('|")Sell weapon for 15 gold\1;/); ``` -You should set the value of `button2.onclick`. +Ви повинні встановити значення `button2.onclick`. ```js assert.match(buyWeapon.toString(), /button2\.onclick/); ``` -You should set the value of `button2.onclick` to `sellWeapon`. +Ви повинні встановити значення `button2.onclick` на `sellWeapon`. ```js assert.match(buyWeapon.toString(), /button2\.onclick\s*=\s*sellWeapon;/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md index 567eb59ed49..06e332d0e61 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md @@ -7,7 +7,7 @@ dashedName: step-111 # --description-- -Дотримуючись того самого шаблону, використайте цей код у функціях `fightBeast` та `fightDragon`. Пам’ятайте, що `beast` знаходиться під індексом `1`, а `dragon` – під індексом `2`. Also, remove the `console.log` call from your `fightDragon` function. +Дотримуючись того самого шаблону, використайте цей код у функціях `fightBeast` та `fightDragon`. Пам’ятайте, що `beast` знаходиться під індексом `1`, а `dragon` – під індексом `2`. Також видаліть виклик `console.log` зі своєї функції `fightDragon`. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md index 5c17b92c6a3..9023a17f2e8 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md @@ -7,7 +7,7 @@ dashedName: step-115 # --description-- -Під викликом `update` встановіть `monsterHealth` на здоров’я поточного монстра. You can get this value by accessing the `health` property of `monsters[fighting]` with dot notation. +Під викликом `update` встановіть `monsterHealth` на здоров’я поточного монстра. Ви можете отримати це значення, звернувшись до властивості `health` об’єкта `monsters[fighting]` за допомогою точкової нотації. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md index 72709e755ba..156ea2bc6c6 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md @@ -7,7 +7,7 @@ dashedName: step-117 # --description-- -Now, set the `innerText` property of `monsterName` to be the `name` property of the current monster. Зробіть те саме для `monsterHealthText` та властивості `health`. +Тепер встановіть властивість `innerText` об’єкта `monsterName` на властивість `name` поточного монстра. Зробіть те саме для `monsterHealthText` та властивості `health`. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md index 8e35428d834..f5f77f4cd76 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md @@ -11,7 +11,7 @@ JavaScript пропонує вбудовану утиліту `Math`, яка п З їх використанням ви можете згенерувати випадкове число в межах діапазону. Наприклад, це генерує випадкове число від 1 до 5: `Math.floor(Math.random() * 5) + 1;`. -Following this pattern, use the addition operator (`+`) to add a random number between `1` and the value of `xp` to your `monsterHealth` variable change. +За цим самим шаблоном використайте оператор додавання (`+`), щоб додати випадкове число між `1` та значенням `xp` до змінної `monsterHealth`. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md index a12db7e5ede..9363eacb471 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md @@ -7,43 +7,43 @@ dashedName: step-132 # --description-- -Your `locations` array doesn't have a fifth element, so `locations[4]` doesn't work. +Ваш масив `locations` не має п’ятого елемента, тому `locations[4]` не працює. -Add a new object at the end of the `locations` array, following the same structure as the other objects. Set `name` to `kill monster`, set `button text` to an array with three `Go to town square` strings, set `button functions` to an array with three `goTown` variables, and set `text` to `The monster screams Arg! as it dies. You gain experience points and find gold.`. +Додайте новий об’єкт в кінець масиву `locations`, дотримуючись тієї самої структури, що й в інших об’єктів. Встановіть `name` на `kill monster`, встановіть `button text` на масив з трьома рядками `Go to town square`, встановіть `button functions` на масив з трьома змінними `goTown` та встановіть `text` на `The monster screams Arg! as it dies. You gain experience points and find gold.`. # --hints-- -Your `locations` array should have five values. +Ваш масив `locations` повинен мати п’ять значень. ```js assert.lengthOf(locations, 5); ``` -Your fifth `locations` value should be an object. +Ваше п’яте значення `locations` повинне бути об’єктом. ```js assert.isObject(locations[4]); ``` -Your fifth `locations` value should have a `name` property with the value `kill monster`. +Ваше п’яте значення `locations` повинне мати властивість `name` зі значенням `kill monster`. ```js assert.equal(locations[4].name, 'kill monster'); ``` -Your fifth `locations` value should have a `button text` array with three `Go to town square` strings. +Ваше п’яте значення `locations` повинне мати масив `button text` із трьома рядками `Go to town square`. ```js assert.deepEqual(locations[4]["button text"], ['Go to town square', 'Go to town square', 'Go to town square']); ``` -Your fifth `locations` value should have a `button functions` array with three `goTown` variables. +Ваше п’яте значення `locations` повинне мати масив `button functions` із трьома змінними `goTown`. ```js assert.deepEqual(locations[4]["button functions"], [goTown, goTown, goTown]); ``` -Your fifth `locations` value should have a `text` property with the value `The monster screams Arg! as it dies. You gain experience points and find gold.`. +Ваше п’яте значення `locations` повинне мати властивість `text` зі значенням `The monster screams Arg! as it dies. You gain experience points and find gold.`. ```js assert.equal(locations[4].text, 'The monster screams Arg! as it dies. You gain experience points and find gold.'); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md index 28a8deb0140..19c798bc945 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md @@ -9,17 +9,17 @@ dashedName: step-133 Слово `Arg!` повинне бути в лапках. Крім екранування лапок існує інший спосіб, як можна включити лапки в рядок. -Change the double quotes around the string `The monster screams Arg! as it dies. You gain experience points and find gold.` to single quotes `'`, then add double quotes around `Arg!`. +Змініть подвійні лапки навколо рядка `The monster screams Arg! as it dies. You gain experience points and find gold.` на одинарні лапки `'`, потім додайте подвійні лапки навколо `Arg!`. # --hints-- -You should use single quotes around the string. +Ви повинні використати одинарні лапки навколо рядка. ```js assert.match(code, /'The monster screams "?Arg!"? as it dies. You gain experience points and find gold.'/); ``` -You should use double quotes around `Arg!`. +Ви повинні використати подвійні лапки навколо `Arg!`. ```js assert.equal(locations[4].text, 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md index 50b9632f201..d4686157059 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md @@ -7,25 +7,25 @@ dashedName: step-134 # --description-- -After a monster is defeated, the monster's stat box should no longer display. +Вікно статистики монстра більше не повинно відображатися після перемоги над монстром. -On the first line of the `update` function, use `monsterStats.style.display` to change the `display` value to `none`. +У першому рядку функції `update` використайте `monsterStats.style.display`, щоб змінити значення `display` на `none`. # --hints-- -You should use `monsterStats.style.display` in the `update` function. +Ви повинні використати `monsterStats.style.display` у функції `update`. ```js assert.match(update.toString(), /monsterStats\.style\.display/); ``` -You should set `monsterStats.style.display` to `none`. +Ви повинні встановити `monsterStats.style.display` на `none`. ```js assert.match(update.toString(), /monsterStats\.style\.display\s*=\s*('|")none\1/); ``` -You should add your code in the first line of the `update` function. +Ви повинні додати свій код у перший рядок функції `update`. ```js assert.match(update.toString(), /update\s*\(\s*location\s*\)\s*\{\s*monsterStats\.style\.display\s*=\s*('|")none\1/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md index cb0609445e6..b49f19e96f7 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md @@ -28,7 +28,7 @@ const block = attack.toString().split("else if"); assert.include(block[1], "if"); ``` -Your new `if` statement should check if `fighting` is strictly equal to `2`. +Ваша нова інструкція `if` повинна перевіряти, чи `fighting` строго дорівнює `2`. ```js const block = attack.toString().split("else if"); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md index 082a866316f..c4e32bfc074 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md @@ -7,7 +7,7 @@ dashedName: step-148 # --description-- -In your `attack` function, below the `health` variable, create an `if` statement. Встановіть умову для виклику функції `isMonsterHit`. +Створіть інструкцію `if` під змінною `health` у своїй функції `attack`. Встановіть умову для виклику функції `isMonsterHit`. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md index 52350a2cd34..e46d034697b 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md @@ -7,7 +7,7 @@ dashedName: step-150 # --description-- -Add an `else` statement to the first `if` statement inside you `attack()` function. Використайте оператор `+=` в інструкції `else`, щоб додати текст `You miss.` в кінець `text.innerText`. +Додайте інструкцію `else` до першої інструкції `if` всередині функції `attack()`. Використайте оператор `+=` в інструкції `else`, щоб додати текст `You miss.` в кінець `text.innerText`. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md index 1dc5cf7d88a..c376d84b8c2 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md @@ -7,11 +7,11 @@ dashedName: step-152 # --description-- -The player should hit if either `Math.random() > .2` **or** if the player's health is less than 20. +Гравець може завдати удару, якщо `Math.random() > .2` **або** його здоров'я менше за 20. -At the end of your `return` statement, use the <dfn>logical or</dfn> operator `||` and check if `health` is less than `20`. +В кінці своєї інструкції `return` використайте <dfn>логічний оператор or</dfn> `||`, щоб перевірити, чи `health` менше за `20`. -The logical or operator will use the first value if it is truthy – that is, anything apart from `NaN`, `null`, `0`, `-0`, `0n`, `""`, and `false`. Otherwise, it will use the second value. +Логічний оператор or використовуватиме перше значення, якщо воно істинне (будь-що, окрім `NaN`, `null`, `0`, `-0`, `0n`, `""` чи `false`). В іншому випадку він буде використовувати друге значення. Наприклад: `num < 10 || num > 20`. diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md index d64b0d149fc..794bebd391a 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md @@ -9,17 +9,17 @@ dashedName: step-34 Зрештою використайте `querySelector()`, щоб отримати елемент `#monsterHealth`. Оскільки ви вже оголосили змінну `monsterHealth`, вам потрібно використати іншу назву змінної для цього елемента. -Declare a new variable with the `const` keyword and name it `monsterHealthText`. +Оголосіть нову змінну за допомогою ключового слова `const` та назвіть її `monsterHealthText`. # --hints-- -You should declare a `monsterHealthText` variable with `const`. +Ви повинні оголосити змінну `monsterHealthText` за допомогою `const`. ```js assert.match(code, /const monsterHealthText/); ``` -Your `monsterHealthText` variable should have the value of your `#monsterHealth` element. +Ваша змінна `monsterHealthText` повинна мати значення вашого елемента `#monsterHealth`. ```js assert.deepEqual(monsterHealthText, document.querySelector('#monsterHealth'));