What is a function?
When Guido van Rossum made the Python programming language, he decided to make some "built-in functions". A built in function (or function) is a quick way to do something like display text to the screen or convert between ASCII and denary. Thank goodness for these shortcuts (or functions) and thank you Guido for making over 50 of them.
Not only that, Guido allows us to make our own functions! (more on that later). Lets play around with some functions. Here are 4 functions:
Clue: bin is short for binary
Clue: chr is useful for converting an ASCII number to a character
Using the code editor
Using the "print" function
print("Tony Starks") is a line of Python code below on line 1. When you click the "Run" triangle, on the right side of the screen "Tony Starks" will be displayed. (Click RUN now to test it)
Test you knowledge