Both are dangerous, just in different ways, you are less boient (sp) in a lake and it is harder to float, also if its a popular lake there will be boats in a fairly small area that can hit you, stuff to get snagged on ie fallen trees. Oceans are so big that it would only be fair to compare the coast line, so your main danger is rips, which if its a public place is normally marked. Sharks are not really a big threat as more people die from falling coconuts then by shark attacks. Speed boats dont come in as close as there is more water so more room for everyone to have their own space. And it is easier to float due to the extra boioncy given by the sea, unless it rough.
I personally am not a strong swimmer (could do it to save my life, but rather not have to) and I don't generally go swimming in either lakes or the ocean. My theory is "if you don't want to get eaten, stay off the dinner plate". Stick to pools.