Write a Python program to check whether your number is equals to 1000 or not?
_________ PLEASEE I NEED QUICK AND QUALIFIED ANSWER_________
Answers
Answered by
2
- def perfect_number(n):
- sum = 0
- for x in range(1, n):
- if n % x == 0:
- sum += x
- return sum == n
- print(perfect_number(1000))
Hope this Helps You...
Please Correct me If I'm Wrong...
vamritaeunameun:
it's not showing correct dear
Answered by
1
Answer:
def near_thousand(n):
return ((abs(1000 - n) <= 100) or (abs(2000 - n) <= 100))
print(near_thousand(1000))
print(near_thousand(900))
print(near_thousand(800))
print(near_thousand(2200))
pls mrkas brainlist
Similar questions