DEV Community

Discussion on: Square a number: awful answers only

Collapse
 
joelbennett profile image
Joel Bennett

Not a full code snippet, but I would submit something terrible like this:

input = raw_input('enter a number: ')
while True:
    random_guess = random()
    if random_guess == input ** 2:
        return random_guess
Enter fullscreen mode Exit fullscreen mode