Skip to content

fixes issue #162 #1023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

fixes issue #162 #1023

wants to merge 3 commits into from

Conversation

coco3427
Copy link

Fixed missing Python code issue

There was an active code section where the Python code was incomplete. I used the c++ code to create an equivalent in Python.

code was checked by @Austing767

Copy link
Owner

@pearcej pearcej left a comment

Choose a reason for hiding this comment

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

Thanks, but this is a C++ text, so all Python code is only intended as pseudocode, so needs to be embedded in a main function and then called when needed. Without this students tend to create global variables and use other bad practices in their code. Please see any other Python code in the book for an example.

@coco3427
Copy link
Author

@pearcej I fixed the code to follow the best practices you mentioned.

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.

2 participants