Answer:
// program in Python to check perfect number
#function to find number is perfect or not
def is_Perfect_Number(n):
#total variable
tot = 1
i = 2
#sum of all divisor of number
while i*i<=n:
if n%i==0:
tot = tot + i + n/i
if tot == n and n != 1:
return 1
i = i+1
return 0
#read until user enter a perfect number
while True:
#read integer
num = int(input("Input an integer: "))
#call the function
if(is_Perfect_Number(num)):
print(num,"is perfect number")
#if perfect number break
break
else:
print(num,"is not a perfect number")
#ask again
print("try again.")
Explanation:
Read number from user and then call the function is_Perfect_Number() with parameter "num".This will find the sum of all divisor of number.If sum is equal to number then it will return 1 else return 0.If the number is not perfect then it will again ask to enter a number until user enter a perfect number.
Output:
Input an integer: 24
24 is not a perfect number
try again.
Input an integer: 28
28 is perfect number
I’m not sure but i think it might be design
Answer:
Explanation:
260 cost units, Big O(n) complexity for a push
Yes that is right a guiiconfatmenu is a list of commands that your computer will tell you to do
Answer:
When I was younger I had a dream about being popular for my studies. everyone knew that I worked hard and devoted to studies. Two years ago I took an admission to a different school, no one knew I studied well how I hittin famous was quite unique. It was hard for students to carry textbooks, a rule was made for textbooks to be in a cupboard. I was the monitor of the cupboard and had keys for it. once in my mathematics class my classmates were shouting my name "SALENA! SALENA! so I would give them there books. maam out of frustration asked "Who is SALENA!? I raised my hand from behind maam in an embarrassed manner. My teacher noticed me and realized I'm a brilliant student.
Explanation:
I hope you have a nice! I tried to shorten it has much as I could. I hope this helps you!