myWizard 360 (aaam) ATA can allocate an incident to a support person based on which of the following factors
Answers
Answer:
Written in Python:
num = int(input("Number: "))
i = 2
print("The factors of "+str(num)+" are ",end='')
while num > 1:
if num%i == 0:
num = num/i
print(str(i)+" ",end='')
i = 2
else:
i = i + 1
Explanation:
This line prompts user for input
num = int(input("Number: "))
This line initializes divisor, i to 2
i = 2
This line prints the literal in quotes
print("The factors of "+str(num)+" are ",end='')
The following while loop checks for divisor of user input and prints them accordingly
while num > 1:
if num%i == 0: This checks for factor
num = num/i Integer division
print(str(i)+" ",end='') This prints each factor
i = 2 This resets the divisor back to 2
else:
i = i + 1