572
edits
Changes
m
→PART 4 - Creating a Python Script with Functions and use them in another Python script
print(str(number))
</source>
:Running your program you should have seen three lines being displayed: the text "python code", a greeting, and a result of a math calculation. The '''if''' statement in the code above is a special '''if''' statement needed to make sure that your "main" code only runs when your script is executed by the Python interpreter directly, and will be ignored when you your python file is being imported by other script, or by an interactive python shell. More on that later.
'''Importing Functions From other Python Scripts'''