Parents who think their kids are quietly doing their homework might find they are quietly hacking into their friends’ e-mails or Facebook pages.

A recent survey reveals that one in six New York City teenagers has tried hacking into other people’s computer files and that nearly 40 percent think hacking is “cool.”

Seven percent said they hacked for money, and 6 percent said they looked upon it as a viable career.

More than half said they did it for fun, and another third said they did it out of curiosity.

“It is very interesting for us to learn more about what our kids are doing,” said Reuven Harrison, chief technology officer for Tufin Technologies, a computer-security firm that surveyed 1,000 city teens.

“I don’t think parents are aware of how computer savvy their kids are.”

But city teens look downright lazy compared with their counterparts across the pond. A similar survey of 1,000 high-school students in London showed that one out of four teens has tried hacking.

In both London and New York City, teens tend to hack into Facebook pages or friends’ e-mail accounts, but computer experts fear it could lead to bigger things.

“Prevention is always an uphill battle, but it’s imperative that parents do pay close attention to their children’s attitudes and beliefs about what is appropriate and legal online behavior,” said Monique Nelson, who is chief operating officer of WebWiseKids.org, an online safety organization sponsored in part by the Justice Department.