Welcome to Westonci.ca, your go-to destination for finding answers to all your questions. Join our expert community today! Discover reliable solutions to your questions from a wide network of experts on our comprehensive Q&A platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly 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