sudo code example

Example 1: how does sudo command work

x = your new software
y = your password
sudo x
(Here a bunch of text will run on its own. Dont worry.)
y

Example 2: sudo

sudo is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user, by default the superuser, and you must have access in the /etc/sudoers files owned by root

Example 3: sudo

Bad example, here is a good example: sudo nmap -sV -sC -T4 xxx.xxx.xx.xx
(any IP you want to scan)

Example 4: sudo

sudo menas to have admin privaliges, like 

sudo python --version