Login using Social Account
     Continue with GoogleLogin using your credentials
Execution always begins at the first statement of the program. Statements are executed one at a time, in order from top to bottom.
Function definitions do not alter the flow of execution of the program but remember that statements inside the function are not executed until the function is called.
A function call is like a detour in the flow of execution. Instead of going to the next statement, the flow jumps to the body of the function, executes all the statements there, and then comes back to pick up where it left off.
You need to create a function before you can execute it. In other words, the function definition has to be executed before the first time it is called.
Try calling the function before executing it and observe the result,
get_name()
def get_name():
print("Cloudxlab")
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Loading comments...