Answer:
Explanation:
The following code is written in Python. It creates a class that takes in one ArrayList parameter and loops through it and calls two functions that check if the numbers are Perfect, Odd, or Even. Then it goes counting each and printing the final results to the screen.
class NumberAnalyzer:
def __init__(self, myArray):
perfect = 0
odd = 0
even = 0
for element in myArray:
if self.isPerfect(element) == True:
perfect += 1
else:
if self.isEven(element) == True:
even += 1
else:
odd += 1
print("# of Perfect elements: " + str(perfect))
print("# of Even elements: " + str(even))
print("# of Odd elements: " + str(odd))
def isPerfect(self, number):
sum = 1
i = 2
while i * i <= number:
if number % i == 0:
sum = sum + i + number / i
i += 1
if number == sum:
return True
else:
return False
def isEven(self, number):
if (number % 2) == 0:
return True
else:
return False
Answer:
yho
Explanation:
hayi no ntwana.... lala boy
total = 0
i = 0
while i < 10:
temp = float(input("Enter Temperature: "))
total += temp
i += 1
print("Sum =", str(total))
I hope this helps!
Answer:
Candidates resume shows his way of presenting and organizing.
Explanation:
- Resume formatting is an important part of a candidate's ability to work. In any professional environment, it's necessary to have a properly formatted resume.
- The resume formatting should be up to date with the latest information and data. The formatting involves the borders, headings, grammar, and spelling or typo errors, etc.
- But these mistakes can be easily avoided such as proofreading and removing unnecessary details and sloppy fronts.