Sección 3. Capítulo 2
single
Local vs. Global Variables
Desliza para mostrar el menú
Tarea
Desliza para comenzar a programar
Create a function that demonstrates the difference between local and global variables by modifying a global variable inside a function.
-
Use the
globalkeyword to modify the global variablexinside the function; -
Assign the value
20toxwithin the function; -
Create a local variable
yinside the function and assign it the value5.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 2
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla