3IA3 - PRIA - 1. GALDETEGIA

3IA3 - PRIA - 1. GALDETEGIA

Professional Development

37 Qs

quiz-placeholder

Similar activities

Quiz Reinforcement

Quiz Reinforcement

Professional Development

40 Qs

Quiz

Quiz

Professional Development

40 Qs

Preguntas sobre Google Presentaciones y PowerPoint

Preguntas sobre Google Presentaciones y PowerPoint

Professional Development

37 Qs

Métodos

Métodos

Professional Development

40 Qs

OSN 2020

OSN 2020

Professional Development

36 Qs

Moneyball Film Analysis

Moneyball Film Analysis

Professional Development

40 Qs

3IA3 - PRIA - 1. GALDETEGIA

3IA3 - PRIA - 1. GALDETEGIA

Assessment

Quiz

Information Technology (IT)

Professional Development

Medium

Created by

IKER OÑATE

Used 1+ times

FREE Resource

37 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cuál es el propósito principal de la función print() en Python?
Mostrar un mensaje por consola.
Guardar datos en un archivo.
Altura
Ejecutar un script automáticamente.

Answer explanation

La función print() sirve para enviar texto o valores a la salida estándar (pantalla).

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué línea debe incluir un script en Linux/Mac para indicar el intérprete de Python?
#!/usr/bin/env python3
#python
// python3

Answer explanation

La primera línea con #! se llama shebang e indica al sistema qué intérprete usar, en este caso Python 3.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué comando en Linux/Mac permite crear un archivo vacío llamado hello_world.py?
python3 hello_world.py
touch hello_world.py
chmod +x hello_world.py

Answer explanation

El comando touch crea un archivo vacío. El comando chmod cambia permisos, y python3 ejecuta.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué hace el comando chmod +x hello_world.py?
Borra el archivo.
Da permisos de ejecución al archivo.
Muestra el contenido del archivo.

Answer explanation

chmod +x otorga permisos de ejecución a un archivo en Linux/Mac.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cuál de las siguientes opciones NO es un método válido para ejecutar un script Python?
./hello_world.py
python3 hello_world.py
bash hello_world.py

Answer explanation

Los métodos correctos son ejecución directa con ./, usando python3 o py en Windows. bash no es un intérprete de Python.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué ocurre si en Python 3 se escribe print "Hola Mundo"?
Se imprime el texto.
Se ejecuta pero sin mostrar nada.
Genera un error de sintaxis.

Answer explanation

En Python 3 la función print requiere paréntesis, de lo contrario se produce un SyntaxError.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cuál es el comando correcto para iniciar el intérprete de Python desde terminal?
python3
runpython
execute python

Answer explanation

El intérprete interactivo se abre con python3 (o python según la instalación).

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?