ComeçarComece de graça

Function scope (2)

Let's try another one. Here, hundred is defined outside of the function scope, but is used inside of the function.

hundred <- 100

percent_to_decimal <- function(percent) {
    percent / hundred
}

What will percent_to_decimal(6) return?

Este exercício faz parte do curso

Intermediate R for Finance

Ver curso

Exercício interativo prático

Transforme a teoria em ação com um de nossos exercícios interativos

Começar o exercício