I'm a new user as you can see, so sorry if the question is boring or imprecise.
I upgraded my Ubuntu 16.04 to 18.04 and everything was fine. But after a power outage, something went wrong. It did not boot correctly once or twice, after that when I boot my laptop an almost black screen stays for a couple of minutes or the ubuntu pre-screen blinks for several times and all these repeats until now. It finally works but it becomes slow and I see a "^[[19~" or "~" sentence repeated in many command lines. when it is booting and I press escape or in the terminal.
when I use a terminal, sometimes someone types this repeatedly!
there is nothing in the update window, although the size of update files is more than 300 mb
Or it does not show some options in programs, e.g. In the update window, there is nothing to show, or when I want to save a document or picture, there is not anything for the file extension. I have no idea what it can be. Is it a virus or can I test my OS to see if it is installed correctly? Because I live in Iran, some sites or repositories may be blocked and I can not update properly, so I don't know if it is installed correctly.
It seems that you entered the GRUB rescue mode. You can either reinstall Ubuntu 18.04 or you can try following the steps in https://www.howtoforge.com/tutorial/repair-linux-boot-with-grub-rescue/.
If possible, please include an image of your screen so that other people could understand your problem more.