Skip to content

Exercise part03-05_powers_of_base_n #109

@joedoesntsharefood

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!

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