Answer to Question #227041 in Python for Remo

Question #227041

You are given

N inputs. Print the given inputs until you encounter a multiple of 5.Input

The first line of input is an integer

N. The next N lines each contain an integer as input.Explanation

In the given example, there are

6 inputs. 1, 2, 3, 5, 9, 6After

3, we have encountered 5, which is a multiple of 5.So, the output should be



1
Expert's answer
2021-08-17T15:50:28-0400
N = int(input())

for i in range(N):
    number = int(input())
    if number % 5 == 0:
        print('Multiple of 5')
        break
    print(number)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS