Westonci.ca is the Q&A platform that connects you with experts who provide accurate and detailed answers. Join our platform to connect with experts ready to provide accurate answers to your questions in various fields. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

What is the output of:

print (8 % 4)


Sagot :

fichoh

Answer:

0

Explanation:

The statement, print(8 % 4) will produce the output 0 ;

The print statement is an inbuilt function which is used to output a typed string or display result of a Mathematical calculation and so on.

The expression in the print statement gives 0;

8%4 means, the remainder when 8!is divided by 4 ; 8 /4 gives 2 without a remainder. Meaning that :

8%4 = 0

Hence, print(8 % 4) = 0