Skip to content

Conversation

@kytrinyx
Copy link
Member

  • Sync sum-of-multiples docs with problem-specifications
  • Sync sum-of-multiples docs with problem-specifications

The sum-of-multiples exercise has been overhauled as part of a project
to make practice exercises more consistent and friendly.

For more context, please see the discussion in the forum, as well as
the pull request that updated the exercise in the problem-specifications
repository:

- https://forum.exercism.org/t/new-project-making-practice-exercises-more-consistent-and-human-across-exercism/3943
- exercism/problem-specifications#2249
There were a few follow-on tweaks to sum-of-multiples.

For context, this is part of the project to overhaul all the practice exercises.
You can read about that here:
https://forum.exercism.org/t/new-project-making-practice-exercises-more-consistent-and-human-across-exercism/3943

----

If you approve this pull request, I will eventually merge it. However, if you are happy with this change **please merge the pull request**, as it will get the changes into the hands of the students much more quickly.

If this pull request contradicts the exercise on your track, **please add a review with _request changes_**. This will block the pull request from getting merged.

Otherwise we aim to take an optimistic merging approach.

If you wish to suggest tweaks to these changes, please open a pull request to the exercism/problem-specifications repository to discuss, so that everyone who has an interest in the shared exercise descriptions can participate.
Copy link
Member

@ee7 ee7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was out of sync slightly:

$ git rev-parse --short HEAD
3b5d88aa
$ bin/configlet sync -e sum-of-multiples
Updating cached 'problem-specifications' data...
Checking exercises...
[warn] docs: instructions unsynced: sum-of-multiples
[warn] some exercises have unsynced docs
$ bin/configlet sync -e sum-of-multiples --docs -uy
Updating cached 'problem-specifications' data...
Checking exercises...
[warn] docs: instructions unsynced: sum-of-multiples
Updated the docs for 1 Practice Exercise
The `sum-of-multiples` exercise has up-to-date docs!
-The energy points are awarded according to the following rules:  
+The energy points are awarded according to the following rules:
 
 1. For each magical item, take the base value and find all the multiples of that value that are less than the level number.
 2. Combine the sets of numbers.
 3. Remove any duplicates.
-4. Calculate the sum of all the numbers that are left.  
-
+4. Calculate the sum of all the numbers that are left.
 
 Let's look at an example:
 
@@ -25,4 +24,4 @@ To calculate the energy points earned by the player, we need to find all the uni
 - Multiples of 5 less than 20: `{5, 10, 15}`
 - Combine the sets and remove duplicates: `{3, 5, 6, 9, 10, 12, 15, 18}`
 - Sum the unique multiples: `3 + 5 + 6 + 9 + 10 + 12 + 15 + 18 = 78`
-- Therefore, the player earns **78** energy points for completing level 20 and finding the two magical items with base values of 3 and 5
\ No newline at end of file
+- Therefore, the player earns **78** energy points for completing level 20 and finding the two magical items with base values of 3 and 5.

- The base value of each magical item collected by the player during that level.

The energy points are awarded according to the following rules:
The energy points are awarded according to the following rules:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The energy points are awarded according to the following rules:
The energy points are awarded according to the following rules:

2. Combine the sets of numbers.
3. Remove any duplicates.
4. Calculate the sum of all the numbers that are left.
4. Calculate the sum of all the numbers that are left.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Calculate the sum of all the numbers that are left.
4. Calculate the sum of all the numbers that are left.

- Multiples of 5 less than 20: `{5, 10, 15}`
- Combine the sets and remove duplicates: `{3, 5, 6, 9, 10, 12, 15, 18}`
- Sum the unique multiples: `3 + 5 + 6 + 9 + 10 + 12 + 15 + 18 = 78`
- Therefore, the player earns **78** energy points for completing level 20 and finding the two magical items with base values of 3 and 5
Copy link
Member

@ee7 ee7 Apr 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Therefore, the player earns **78** energy points for completing level 20 and finding the two magical items with base values of 3 and 5
- Therefore, the player earns **78** energy points for completing level 20 and finding the two magical items with base values of 3 and 5.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried a fake-out, since resolving the conflicts through the website appeared to block rebasing. This may not work either, in which case I might need to re-submit via a configlet sync.

Copy link
Member

@BethanyG BethanyG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! 🌟 🌈 It had merge conflicts, but I accepted the latest instructions that does a strict less than rather than a less than or equal to.

Resolved merge conflicts, and am now attempting to re-push to repo.
@BethanyG
Copy link
Member

I am going to Squash and Merge. I'd prefer to do a rebase + merge, but for this it seems simpler to just forge ahead.

@BethanyG BethanyG merged commit 914774c into main Apr 11, 2023
@BethanyG BethanyG deleted the sync-sum-of-multiples-docs branch April 11, 2023 18:31
@BethanyG
Copy link
Member

Oh, man. @ee7 - I was working locally while you were writing your comments. Did I just screw things up again?

@BethanyG
Copy link
Member

I'll do a re-sync to catch the little turdlets.

@ee7
Copy link
Member

ee7 commented Apr 11, 2023

Doesn't matter. We can always just fix those things in #3396 :)

@BethanyG
Copy link
Member

I have to say that being able to sync all those docs automagically is well, magical. ✨ 😄 I 💙 configlet.

@ChronoJon
Copy link

It's still not synced properly. I just did the exercise and the instructions shown as well as downloaded are still wrong:
image

README.md
...

The player completed level 20 and found two magical items with base values of 3 and 5.

To calculate the energy points earned by the player, we need to find all the unique multiples of these base values that are less than or equal to level 20.

  • Multiples of 3 up to 20: {3, 6, 9, 12, 15, 18}
  • Multiples of 5 up to 20: {5, 10, 15, 20}
  • Combine the sets and remove duplicates: {3, 5, 6, 9, 10, 12, 15, 18, 20}
  • Sum the unique multiples: 3 + 5 + 6 + 9 + 10 + 12 + 15 + 18 + 20 = 98
  • Therefore, the player earns 98 energy points for completing level 20 and finding the two magical items with base values of 3 and 5.

You can make the following assumptions about the inputs to the
sum_of_multiples function:

  • All input numbers are non-negative ints, i.e. natural numbers
    including zero.
  • A list of factors must be given, and its elements are unique
    and sorted in ascending order.

...

@BethanyG
Copy link
Member

@ChronoJon -- Thanks for commenting. We are well aware that we have some syncing issues. Please see this note in the forum for some more details, with an ETA on a fix . Since this issue is affecting more than one track, we need to be careful as we deploy it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants