Skip to content

Simple indention error - Page 147 #2

Description

@peterdcasey

There is an indention error in the code just over halfway down page 147. The code is not in the listing but below it. The code after the while should be indented.

trial_factor = 2
while trial_factor < value:
if value % trial_factor == 0:
    is_prime = False # Found a factor
    break # No need to continue; it is NOT prime
trial_factor += 1 # Try the next potential factor

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions