Not sure if this is going to work, but instead of trying to explain what a function is at a theoretical level - which
is a difficult concept to grasp at that age - why not show her the code without too much theory?
I'm not a programmer by profession, so take everything I say with a grain of salt, why not trying to show what a ruby add/multiply function looks like:
#!/usr/bin/env ruby
def add(x,y)
b = x + y
return b # could be just "b" or omitted but I consider verbosity a *virtue* here
end
Of something like:
#!/usr/bin/env ruby
def hello(name)
puts "Good morning, #{name}"
end
I believe Ruby is a better choice than Python because it
can be more verbose, closer to English and doesn't rely on indentation. Javascript might be another option, but explaining the difference between class and function in JS to a novice might be problematic.
There's this book which is rather playful: http://poignant.guide/book/chapter-1.html