This assignment requires one file named program121.py containing

profileThehonest
 (Not rated)
 (Not rated)
Chat

This assignment requires one file named program121.py containing a main function and a recursive function named findmod. The findmod function should compute a mod b but without using the % operator.

 

In main:

 

    prompt the user to enter two positive integers.

    call the findmod function with these integers as arguments.

    print its returned value.

 

The findmod function, findmod(integer1, integer2), must recursively calculate the remainder and then return it.

 

SAMPLE OUTPUT

Enter a positive integer 17

Enter another positive integer 5

The remainder is 2

 

SAMPLE OUTPUT

Enter a positive integer 30

Enter another positive integer 8

 

The remainder is 6

    • 10 years ago
    A+ Work
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      program121.zip