NEW
Font size
WorksheetsPython Functions
Total questions: 16
Worksheet time: 9mins
John will go for a run if it is sunny or if he has free time. Otherwise, he will stay at home and read a book. In which of the following scenarios will John stay at home and read a book? / John irá a correr si hace sol o si tiene tiempo libre. De lo contrario, se quedará en casa y leerá un libro. ¿En cuál de los siguientes escenarios John se quedará en casa y leerá un libro?
It is raining and John is busy. / Está lloviendo y John está ocupado.
It is sunny but John is busy. / Hace sol pero John está ocupado.
It is cloudy and John has free time. / Está nublado y John tiene tiempo libre.
It is sunny and John has free time. / Hace sol y John tiene tiempo libre.
Which of the names below follow all naming rules? / ¿Cuál de los siguientes nombres sigue todas las reglas de nomenclatura?
draw_five_triangles
5_triangles
Draw 5 Triangles
special_function_2
When defining a function, the definition must occur before it is called. / Al definir una función, la definición debe ocurrir antes de que se llame.
True
False
What character should be placed at the end of the function "def" line, after the parentheses? / ¿Qué carácter se debe colocar al final de la línea de función "def", después del paréntesis?
Hashtag (#)
Colon(:)
Exclamation (!)
Dash (-)
Which of the following is NOT a Python rule for naming functions? / ¿Cuál de las siguientes NO es una regla de Python para nombrar funciones?
Functions names can contain letters, numbers and underscores
Function names must be less than 32 characters
The first character in a function name cannot be a number
Function names are case-sensitive
True or False? In Python, function names are case-sensitive. / ¿Verdadero o falso? En Python, los nombres de las funciones distinguen entre mayúsculas y minúsculas.
True
False
