Answer to Question #228718 in Python for Nikk

Question #228718
A company is planning a big sale at which they will give their customers. I want the full code of this question
1
Expert's answer
2021-08-23T07:29:19-0400




import math
def perfect(number):
    root = math.sqrt(number)
    if int(root + 0.5) ** 2 == number:
        return 1
    else:
        return 0
        
        
        




CustomerIds = [36, 16, 4, 10, 256, 40, 54, 81, 48, 49]
count1 = 0 


print(CustomerIds)
print("Number of customers are: "+str(len(CustomerIds)) )
for unique in CustomerIds:
    if perfect(unique) == 1:
        count1 += 1
print("Sample Output")
print(count1)



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS