Just being able to lookup something really quick while you're learning is much more efficient than waiting the next day to ask your teacher
Is it, really? Before we had the Internet and Stackexchange we had manpages, the library and your own brain. When you put in an effort to solve your problem it's better for understanding than looking up the solution.