Computer Science, asked by sujal867, 1 month ago

What will be the output after the following statements? x = 5 y = 4 print(x % y)

Answers

Answered by himanisacaggarwal
3

how to make a difference between your age or age of a woman who has not joining the house in your life toy story writing for the guardian and the

Answered by varshamittal029
0

Concept:

% is the modulus operator. This modulus operator returns the remainder when the left operand is divided by the right operand.

Given:

x = 5

y = 4

print(x % y)

Find:

Find the output of the given code.

Solution:

In the given code x=5 and y=4

∴ ( 5%4 ) will return the remainder when 5 is divided by 4.

Since, when 5 is divided by 4 it leaves the remainder 4, therefore the output will be 1.

Output:

1

Similar questions