A 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:
number1=int(input("Enter a number: "))
number2=int(input("Enter another number: "))
def adding(num1, num2):
total=num1 + num2
This subprogram explained:
Test you knowledge