Skip to content

changed the code to get "no pairs " output #1

@life303

Description

@life303

num = float(input("enter the no.:"))
r = 0
p = 0
while r**p != abs(num):
p += 1
if p > 5:
p = 0
r += 1
if num < 0:
if p % 2 == 1:
p = 0 - p
r = 0 - r
if p == 1:
print("no pairs exists")

print("the root of number entered is ", r, " and power is ", p)

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