I was up the creek, and should probably have been in a state of panic and terror. I wasn't, though.
Instead, I used the Guest account to do some browsing on the web on how to bring back a deleted account. The answer:
- Shift-boot the computer to get the the GRUB (boot-up) menu.
- Choose "Advanced options for Ubuntu"
- Select one of the options in the next menu that ends in "recovery mode"
- Press the Return key (Enter key, if you prefer) so that the system boots.
- Choose from a menu "Drop to root shell prompt"
- Mount the hard drive so that you can make changes to it by typing "mount -o remount,rw /"
- Then type "adduser gareth sudo" (It won't be "gareth" for anyone but me. It's the name of the account).
- Reboot the machine.