Prog modular arithmetics --- Introduction ---

This modules gathers interactive programming exercises, variable and configurable, on the subject of modular arithmetics. The software can ask you to produce an algorithm to compute addition, multiplication, power, polynomial, division etc. in NZZ, where N is a prime. It will then compile your submitted code and test it on randomly generated integers for the validity of the code.

01 - Addition

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


03 - Linear combination

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


11 - Division

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


10 - Inverse

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


02 - Multiplication

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


05 - Small polynomial

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


07 - General polynomial

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


04 - Power I

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


06 - Power II

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


08 - Power III

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


09 - Power IV

a function which takes an integer , integers , and returns the class of

in represented by an integer between 0 and . ()


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the case :

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


This page is not in its usual appearance because WIMS is unable to recognize your web browser.

In order to access WIMS services, you need a browser supporting forms. In order to test the browser you are using, please type the word wims here: and press ``Enter''.

Please take note that WIMS pages are interactively generated; they are not ordinary HTML files. They must be used interactively ONLINE. It is useless for you to gather them through a robot program.

Description: programming exercises on modular arithmetics. This is the main site of WIMS (WWW Interactive Multipurpose Server): interactive exercises, online calculators and plotters, mathematical recreation and games

Keywords: wims, mathematics, mathematical, math, maths, interactive mathematics, interactive math, interactive maths, mathematic, online, calculator, graphing, exercise, exercice, puzzle, calculus, K-12, algebra, mathématique, interactive, interactive mathematics, interactive mathematical, interactive math, interactive maths, mathematical education, enseignement mathématique, mathematics teaching, teaching mathematics, algebra, geometry, calculus, function, curve, surface, graphing, virtual class, virtual classes, virtual classroom, virtual classrooms, interactive documents, interactive document, algorithmics, arithmetics, modular calculation, modular arithmetics