Python for Engineers
Solve Problems by Coding Solutions - A Complete solution for python programming
Blog Pages
Blog
News
Distributions
NumPy Tutorials
Self Learning
IDE
Packages
About
Program to check the Perfect Number or Not
num=input("Enter the number:")
i=1
while i<=num/2:
s=i**2
if s==num:
print "perfect square"
break
i+=1
else:
print "Not a perfect square"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment