<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_flag(var, flag):
 """ for use when calling command-line scripts from withing a program. if a variable is present, add its proper command_line flag. return a string. """

    if var:
        var = flag + " " + str(var)
    else:
        var = ""
    return var