Class 12th CBSE CS
WAP to find whether an inputted number is Perfect number or not.
Solution: –
def perfectnum(num): divsum = 0 for i in range(1,num): if num % i ==0: divsum = divsum + i #divsum += i if divsum == num: print("Perfect Number......") else: print("Not a Perfect number.") n = int(input("Enter the Postive number :- ")) perfectnum(n)
Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable
Popular Videos
UX for Teams
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer
SEO & Instagram
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer