+ 6
[Challenge]Display all perfect squares
create a function which takes as parameters an integer and return an array of all perfect square less than number parameter eg. def perfSquares(number) arr_perfect=[] for x un 0...number ..... return arr_perfect p perSquares(10)#=>[1,4,9]
4 Antworten
+ 3
My try:
https://code.sololearn.com/W5Dq6CZFtKX3/?ref=app
Note: he said "perfect squares LESS than number parameter", meaning that if the input is "25", the output is "1, 4, 9, 16".
+ 2
Why did someone downvote this challenge?
+ 2
Here is my try
https://code.sololearn.com/c1sFVHXm8LxH/?ref=app