Numbers
Data Types
Fundamentals
def perfect(numbers): perfected_numbers = [] for num in numbers: root = num ** 0.5 if (root).is_integer(): perfected_numbers.append(num) return perfected_numbers
- def perfect(numbers):
#Code goes here. Good Luck!- perfected_numbers = []
- for num in numbers:
- root = num ** 0.5
- if (root).is_integer():
- perfected_numbers.append(num)
- return perfected_numbers