Funciones en Python para Principiantes

Quiz
•
Computers
•
10th Grade
•
Hard
Andres Vinces
Used 1+ times
FREE Resource
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 15 pts
¿Cómo se declara una función en Python?
function nombre_funcion(parametros)
def nombre_funcion(parametros):
create nombre_funcion(parametros)
nombre_funcion(parametros) = {}
Answer explanation
En Python, las funciones se declaran utilizando la palabra clave 'def', seguida del nombre de la función y los parámetros entre paréntesis. Por lo tanto, la opción correcta es 'def nombre_funcion(parametros):'.
2.
MULTIPLE CHOICE QUESTION
30 sec • 15 pts
A) function nombre():
Function 'nombre' is not defined.
Function 'nombre' has been deprecated.
Function 'nombre' is a built-in function.
Function 'nombre' is correctly defined.
Answer explanation
The correct choice is 'Function 'nombre' is not defined.' because the question indicates that the function has not been declared or recognized in the current context, making it unavailable for use.
3.
MULTIPLE CHOICE QUESTION
30 sec • 15 pts
B) def nombre():
The function 'nombre' is correctly defined.
The function 'nombre' has a return statement.
The function 'nombre' is incomplete.
The function 'nombre' is fully implemented.
Answer explanation
The function 'nombre' is incomplete because it lacks a body or implementation details. A complete function should have a return statement or at least some executable code.
4.
MULTIPLE CHOICE QUESTION
30 sec • 15 pts
C) declare nombre():
nombre: function() {}
def nombre():
function nombre(){}
nombre() = function() {}
Answer explanation
The correct choice is 'def nombre():', which is the syntax for defining a function in Python. The other options use JavaScript or incorrect syntax, making them invalid for Python function declaration.
5.
MULTIPLE CHOICE QUESTION
30 sec • 15 pts
D) func nombre():
nombre() => {}
def nombre():
nombre: function() {}
function nombre(){}
Answer explanation
The correct choice is 'def nombre():', which is the syntax for defining a function in Python. The other options use syntax from JavaScript or are incorrect, making 'def nombre():' the only valid Python function definition.
6.
MULTIPLE CHOICE QUESTION
30 sec • 15 pts
B)
B
D
C
A
Answer explanation
The correct answer is B because it directly corresponds to the question prompt. The other options (A, C, D) do not match the criteria set by the question, making B the only valid choice.
7.
MULTIPLE CHOICE QUESTION
30 sec • 15 pts
¿Qué es un parámetro en una función?
Un parámetro es un valor de salida de una función.
Un parámetro es una variable que recibe valores de entrada en una función.
Un parámetro es una constante que no puede cambiar.
Un parámetro es un tipo de dato que se utiliza en la función.
Answer explanation
Un parámetro es una variable que permite a una función recibir valores de entrada. Esto es fundamental para que la función pueda operar con diferentes datos, a diferencia de un valor de salida o una constante que no cambia.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
scratch

Quiz
•
3rd - 12th Grade
20 questions
Conceptos de Programación

Quiz
•
9th - 12th Grade
20 questions
TID 1 2do trimestre

Quiz
•
9th - 12th Grade
25 questions
JavaScript

Quiz
•
10th - 12th Grade
23 questions
Examenes de Paginas WEB 2025

Quiz
•
7th Grade - University
18 questions
Repaso Teórico Python

Quiz
•
8th Grade - University
18 questions
Cuestionario sobre Bases de Datos

Quiz
•
10th Grade - University
18 questions
Taller Evaluativo Hardware 6

Quiz
•
6th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade