Question: 2. What are the outputs if the program if the input is 28? def main(): num = int(input (Enter a number: ')) print('Is the number

2. What are the outputs if the program if the input is 28? def main(): num = int(input (Enter a number: ')) print('Is the number perfect?', perfect_number (num)) det perfect_number(n): sum = 0 for x in range (1, n): If nx = 0 Your answer: sum += x Enter a number: 28 print (x, it', sum) return sum == main() 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
