Skip to content

Simple indention error - Page 147 #2

@peterdcasey

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

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