Fixes #14: Correct print
function usage for Python 3 compliance
#15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Overview
This pull request addresses a bug described in Issue #14 titled "A Little Bug". The issue pertains to the use of print statements in the provided solutions, which utilize Python 2 syntax that is incompatible with Python 3. This update ensures all print statements in the relevant files conform to Python 3 syntax by including necessary parentheses.
Changes Made
10_Random_sampling_Solutions.ipynb
. The following updates were made:print np.mean(out3)
toprint(np.mean(out3))
print np.random.choice(x, p=[.3, .5, .2])
toprint(np.random.choice(x, p=[.3, .5, .2]))
Additional Notes
While the modifications in
10_Random_sampling_Solutions.ipynb
have been completed successfully, it is important to recognize that other notebooks may contain similar issues. Future efforts should focus on reviewing and correcting those files as well.Issue Reference
This pull request fixes the bug reported in Issue #14.
Fixes #14
Please review the changes and let me know if you have any questions or if further modifications are necessary!