mariazzzzz
Sep 17, 2016, 03:47 PM
You remember the imaginary number, I, right? You should also recall that i1=i, i2= 1, i3= i, i4=1,
I
5=i, i6= 1, i7= i, i8=1, and so on. Notice i5=i
.
This is because 5%4 = 1 (Modulus operation of 4
on the exponent 5 is 1). Similarly we see how the powers of I cycle around.
In this program, write a program where you take an exponent of I of your choosing (not the one I
use below in the example), perform a modulus operation on the exponent, and then outputs the
equivalent expression per the chart above.
For example, if I used i10, you would write a program that would output the following sentences:
I am examining i to the power of 10.
The exponent 10 is 2 modulus 4. (NOTE: Use the modulus operation on the exponent to get
the result of 2. Also note the quotation marks around the 10.)
THEN have your program print out the following sentences.
If the modulus operation of 4 on the exponent of I is 1, then the result is i.
If the modulus operation of 4 on the exponent of I is 2, then the result is 1.
If the modulus operation of 4 on the exponent of I is 3, then the result is i.
If the modulus operation of 4 on the exponent of I is 0, then the result is 1.
write a program where you take an exponent of i8
I
5=i, i6= 1, i7= i, i8=1, and so on. Notice i5=i
.
This is because 5%4 = 1 (Modulus operation of 4
on the exponent 5 is 1). Similarly we see how the powers of I cycle around.
In this program, write a program where you take an exponent of I of your choosing (not the one I
use below in the example), perform a modulus operation on the exponent, and then outputs the
equivalent expression per the chart above.
For example, if I used i10, you would write a program that would output the following sentences:
I am examining i to the power of 10.
The exponent 10 is 2 modulus 4. (NOTE: Use the modulus operation on the exponent to get
the result of 2. Also note the quotation marks around the 10.)
THEN have your program print out the following sentences.
If the modulus operation of 4 on the exponent of I is 1, then the result is i.
If the modulus operation of 4 on the exponent of I is 2, then the result is 1.
If the modulus operation of 4 on the exponent of I is 3, then the result is i.
If the modulus operation of 4 on the exponent of I is 0, then the result is 1.
write a program where you take an exponent of i8