¡GoConqr estrena diseño! Cuéntanos qué te parece.

Módulo 16 de 16 · Multimedia

Return the x number to the power of y, y times!

Kostas Diakogiannis

Return the x number to the power of y, y times!

F-9 Return the x number to the power of y

Write a function that accepts two numbers and validate that their type is number for sure. 

After that the function should print to the console the all the exponential values between 1 and y. 

For example if we have function(3, 5) The function should print 3, 9, 27, 81, 243.

Another example (2, 8) The function prints 2, 4, 8, 16, 32, 64, 128, 256.

Create another function that accepts again two numbers but in this case it prints all the exponential values (y) for every x number from 1 to x.

 

Example:

example(5, 4) Will for numbers from 1 to 5 all the exponential to the power of 4.

ex. 1**1

1**2

1**3

1**4

2**1

2**2

2**3

2**4

3**1

3**2

3**3

3**4

4**1

4**2

4**3

4**4

5**1

5**2

5**3

5**4

 

Instrucciones

Para avanzar en el curso, envía un intento de este test. Puedes enviarlo después de la última pregunta.

Ir al módulo elegido

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?