Python Python Basics Functions and Looping Create a Function

Ozaveshe Balogun
Ozaveshe Balogun
4,898 Points

please I need assistance. this code runs well on workspace but still get error. whats wrong ?

squaring.py
def square(number):
    sqr = (number * number)
    return sqr



inputs = int(input("enter the square number"))

sq= square(inputs)
print("The square of {} is {}".format(inputs, sq))

2 Answers

Your function is good for task 1. The code after the function though needs to be removed in that you should only do what the task asks. You receive: "Bummer: EOFError: EOF when reading a line" because the checker doesn't handle the input function.

For the second task pass 3 to your function and store the result in a variable named result.

Ozaveshe Balogun
Ozaveshe Balogun
4,898 Points

ok. Thank you very much for the quick respond