Use what it gives back · Usa lo que devuelve
Use what it gives back
double is written for you and returns a number. Call it with 21 and store the answer in answer.
return hands a value back to whoever called the function. That value is not printed — you catch it with =, exactly like any other result.
Usa lo que devuelve
double está escrita para ti y devuelve un número. Llámala con 21 y guarda la respuesta en answer.
return le devuelve un valor a quien llamó a la función. Ese valor no se imprime — lo capturas con =, exactamente como cualquier otro resultado.
double is written for you and returns · retornos a number. Call it with 21 and store the answer in answer. · double está escrito para ti y devuelve un número. Lámalo con 21 y guarda la respuesta en answer.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.