Answer:
input number
calculate modulus of the number and 5
compare outcome to 0
if 0 then output "divisible by 5"
else output "not divisible by 5"
Explanation:
The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.
The article for the assignment I need help with part 2xexbixneixe
Answer:
developer tool
Explanation:
if you're using chrome click on the 3 dots that's in the top right corner and go to tools, you will see "developer tools" and click on that, then you will see an icon that shows a laptop/computer and an iphone click on that and you can even choose the type of phone you wish to see the view of (ex. iphone X), refresh the page and you will be able to see the direct message icon and you will be able to message your friend.
good luck.
Output of the given code is:
Y
X
Y
Y
X
Y
XY
Y
X
Y
Y
X
Y
XY
Y
X
Y
Y
X
Y
XY
Y
X
Explanation:
In the for loop variable "number" will iterate from 1 to 150(inclusive).
in the "if" condition it is checking that the number is divisible by 3 and 5 both if the number is divisible by both 3 & 5 then it will print XY as output.
In the first "elif", if the number is divisible by 5 only then it will print X
as output.And in the last "elif", if number is divisible by 3 only then it will
print Y as output. Nothing will be printed if all three conditions are FALSE.