As nouns the difference between flat and floor is that flat is an area of level ground or of a building (such an apartment) while floor is the bottom or lower part of any room; the supporting surface of a room.
Well, piso is the horizontal flat surface, while suelo is the surface that you can dig in. Of course, the meanings of both are extended to related concepts, hence on the floor could use both. Living on the second/third/... floor obviously is about piso, planting a seedling is about suelo.
Voy a hablar en español para que no haya mal entendidos, soy de España y he dado por supuesto que cuando dicen piso quieren decir suelo, pero los de Duolingo tienen que pensar que aquí también hay usuarios hispanohablantes que en ningún momento se plantearían piso como suelo = floor, sino piso como apartamento = flat, apartment; como bien decía tonycollard en el otro comentario.
I think people would understand, but maybe there's a better word for it. Perhaps "Suelo" is a better word for ground. Like if you were show casing elegant wood floors, you wouldn't say Suelo. That's ugly. lol Piso is a more proper word for that situation. Even though at home if you said pick that up off the "suelo" it would be referring to the floor, but obviously it's not the elegant way of saying it.
People on here always think so short sighted. Ok, it may be the only "logical" thing right now; but say it is a different sentence like: "The cat sleeps on the box." verses "The cat sleeps in the box" How would you differentiate between the cat sleeping "in" or "on" the box? You can't answer "because it isn't possible" because they are both possible. In some cases, the difference may be life or death. Explaining something ad hoc, doesn't help out.
Alexander was not being shortsighted. He was just explaining why "He sleeps in the floor." was wrong, not how to differentiate between "in" and "on".
If it was, "El gato duerme en la caja.", then "in" and "on" would both be correct--In that case, you can't differentiate; the sentence is ambiguous. If you really needed to differentiate, you could use a different Spanish word, such as "adentro de" ("inside of") or "encima de" ("on top of").
At the time, he was the only person who commented and he only stated the obvious. I believe lila probably knows you cant sleep in the floor. The problem at hand was how do you differentiate between being in or on something which goes beyond just this example. The answer given added no useful information to the conversation. There are probably many people wondering why the word en is even used at all, because of its ambiguity. If you have to use a different word to make a point clear, why not just use that other word all the time. Keep in mind people reading these posts are learning and trying to explain problems they encounter with formed logic in their heads. I'm sorry you were offended but shortsighted , obvious answers do little to help anyone. Your answer, though unnecessarily diplomatic, did a better job of explaining how you can choose alternate words, but still en could be problematic in some situations.
"He sleeps in the floor." is correct as well. It is, however, far less common, and because of that may not have been included as a correct translation. Then again, I expect most people who are looking at someone in a bed in a depression in the floor will realise what words to use.