# Return vs. print

def f(x):
    print("Are we here?")
    print(x * 2)
    return x * 2 # nothing after the return will be executed
    print("Are we here?") 
    
print("outside function")
    
print('about to define g')

def g(x) -> bool:
    print(x * 2)
    # default return value of functions is None
    # if it doesn't reach a return statement
    if x == 4:
        return "x is equal to 4" 
    
print('after g(x) definition')

print('about to call g(x)')
g(4) # the value won't show up in the shell unless we print it
print(g(4))
print('called g(x)')
    
f('hi')
g(4)

b = g('hi') 
print(type(b))  # b's type is NoneType because g('hi')
                # doesn't return anything