Can a sketch write to EEPROM while it is running.?

Thanks for answering my questions.

Grumpy_Mike I agree with you in the fact that I am not an expert. However, I don´t consider myself a beginer either. I build my own robots with Arduino and know how to make them avoid obstacules or follow lines, interact with leds, how to drive them with infrared or radio signals, interact with visual programs like Scratch and some other things as well. So I did the "Hello World" of Arduino by lighting the led 13 and other tutorials a long time ago. All the codes I have written or adapted are available of course to prove what I´m saying.

I am sorry that You think that I ask "the most trivial questions". I haven´t got experience handling EEPROM memory as I mentioned. Regarding where to put the if statemen, I always put them on the loop part of the program. However, a few days ago you told me not to write in the EEPROM memory on a loop as I could damage the memory. Before that I always did this kind of things in SRAM memory also on a loop. So even if this was for reading values not writting, I just wanted to be sure that this if statement went as I thought on the loop part.