S
S
SANTIK_YT2021-12-26 18:24:23
Python
SANTIK_YT, 2021-12-26 18:24:23

How do you know if there is a remainder after division?

I need the script to recognize if there is a remainder or not and display true or false for example.
The person entered 5.0 the script writes true to him Entered 7.31794 the script writes False.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kadabrov, 2021-12-26
@SANTIK_YT

def is_remainder():    
    a = int(input())
    if a % 2 == 0:
        print('True')
    else:
        print('False')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question