Computer Studies‎ > ‎Python‎ > ‎Python Tutorial‎ > ‎

Subtraction

The subtraction operator in Python is a hyphen (“-”).

The following statement subtracts the number 3 from 4 and prints the result (1):

print (4 - 3)

Assignment

Write a program that subtracts 5 from 6.

Save as "008.py".

Note: don't forget that each of your programs should have a proper program header!
Comments