Getting startedFunctionsVariablesVariables 2InputsSelectionFlowchartsData typesPseudocode1Pseudocode2Subprogram1Subprogram2 |
SubprogramsA subprogram is a piece of code that can be used over and over again. If you were coding a calculator, you could make a subprogram that only does adding. Every time you need to do adding, you can use the same subprogram.
Here is a simple subprogram: def newYear(): print("Happy new year!") newYear() This subprogram explained:
Test you knowledge |