Write a Bash script to install the latest version of Python 3.
# update package manager
sudo apt-get update

# install latest version of Python 3
sudo apt-get install python3

# check version of python installed
python3 --version