It's difficult to show you the direct route if I don't know anything about your level of knowledge.
Do you know:
- the difference between a local variable and a global variable? How to define them? Scope?
- how to call a function?
- what a return value is and how to use it after returning from a function?