A virus is a very specific type of malware. It executes and replicates itself.

If we take the code we wrote for videos and include pseudocode for replicating itself, we create a virus. Give it a try.

See that? The malware is more difficult to get rid of because it replicated itself inside webbrowser.exe before crashing the computer.

Make sure to have the malware replicate its code when creating a virus.