Skip to content

Exercise part03-05_powers_of_base_n #109

Description

@joedoesntsharefood

Hi, in your model solution for the exercise above you allow the multiplier to be equal to 0, what leads to an infinity loop. Shouldn't model solution limit the multiplier to values higher than 0?

Described code below:

limit = int(input("Upper limit: "))
multiplier = int(input("Base: "))
number = 1
while number <= limit:
print(number)
number *= multiplier

Have a great day!

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions