So I am learning python and want to solve a problem that takes area as an integer input and calculates how many square meters can be made with it.
Example
For example, if you enter an area of 12 meters (input 12), you can make one 3x3 square meters (with a area of 9 meters). That would leave you an area of 3 meters, so you can turn them into three 1x1 square meters.
Example Input and output.
input: function(12)
output: 9,1,1,1
input: function(22)
output: 16, 4, 1, 1
input: function(15324)
output: 15129,169,25,1
I tried the following but I couldn't make it exactly.
def area(num):
return num * num
number = float(input(" Please Enter any numeric Value : "))
area= square(number)
print(area)
I only tried to return the square number of a given number but how can I improve it based on the problem?