Crear
Descargar
Obtener Plan Académico
Compartir juego
Intégralo en tu plataforma

Puedes integrar el juego en un LMS compatible con LTI 1.1 o LTI 1.3 como Canvas, Moodle, o Blackboard. De esta manera podrás guardar las puntuaciones automáticamente en el libro de calificaciones de esa plataforma.
Descargar
Has superado el número máximo de juegos que puedes integrar en Google Classroom con tu Plan actual.

Para integrar tantos juegos como quieras en Google Classroom, necesitas un Plan Académico o un Plan Comercial.

Has superado el número máximo de juegos que puedes integrar en Microsoft Teams con tu Plan actual.

Para integrar tantos juegos como quieras en Microsoft Teams, necesitas un Plan Académico o un Plan Comercial.

La descarga de juegos es una característica exclusiva para usuarios con un Plan Académico o un Plan Comercial.

Obtén ahora tu Plan Académico o Comercial y comienza a integrar tus juegos en tu LMS, web o blog.

Si lo deseas, puedes descargar un juego de prueba aquí y probar su integración:

Pure Python code

Test

Jugadas 1

Sobre esta actividad

Test your knowledge of pure Python code

Creada por

España

Descarga la versión para jugar en papel

Crea tu propio juego gratis desde nuestro creador de juegos
Compite contra tus amigos para ver quien consigue la mejor puntuación en esta actividad

Top juegos

%
Anónimo
Anónimo
%
%
%
Has superado el número máximo de juegos que puedes imprimir con tu Plan actual.

Para imprimir tantos juegos como quieras, necesitas un Plan Académico o un Plan Comercial.

Imprime tu juego
Pure Python code
 

Pure Python codeVersión en línea

Test your knowledge of pure Python code

por Álvaro Manuel Navarro Cruz
1

Which line is not correct? Pay attention to the indentation.

2

Is this correct if we want to generate a random number between 1 and 100?

3

Is it necessary to specify the last "elif" condition?

4

Which of the following statements about the filterEvenNumbers() function are correct?

Choose one or more answers

5

What is the purpose of the while loop in the timesTable program?

Feedback

If we leave line 5 in place, the if condition will be empty.

The function random.randint(a, b) generates a random integer including both endpoints a and b. So, random.randint(1, 98) will only generate numbers from 1 up to 98, excluding 99 and 100.

Using else here simplifies the code because all other possibilities have been eliminated by previous checks (if and elif). Since the only remaining case is that the number is equal, else handles it cleanly and reduces redundancy. This approach is common and accepted in programming to keep the code concise.

The while loop in the timesTable program is designed to repeatedly prompt the user to enter numbers and print the corresponding multiplication tables. The loop continues executing as long as the user does not enter the sentinel value -1. When the user inputs -1, the loop terminates, effectively stopping the repetition of multiplication tables. This allows the program to keep running and displaying new tables for different numbers until the user decides to stop by typing -1. Therefore, the purpose of the while loop is to keep printing multiplication tables until the user types -1.

¿Seguro que quieres abandonar la página?

Si sales, perderás la partida en curso.