Two California teens who tried to change their grades by breaking into their school's computer system have earned themselves an F in hacking. While altering their own records, they accidentally gave all 18,697 students in the Natomas Unified School District A's as well, and on Tuesday one of the boys was sentenced to 100 hours of community service and placed on probation for six months, The Associated Press reports. The boy's parents also have to pay $500 in damages. The other teen is due back in court June 14. Tuesday's sentencing could've been harsher if the teen hadn't pleaded guilty on Monday in Sacramento Juvenile Court, admitting to assisting the other student break into the computer system. He was originally charged with four felonies and, if convicted on those charges, could have landed in custody for up to three years. Deputy District Attorney Sue Wilson said his penalty was lessened since he confessed and had no prior record. In addition to changing the grades, the two 17-year-old students also deleted school files and caused the computer system to crash in order to cover up their tracks, but that blunder eventually led investigators to their doors in March. The deleted files were recovered from a backup system. "There was no permanent damage, and it seemed an appropriate resolution to the case. Our hope is that he learned his lesson from being arrested and being in court," Wilson told the AP. Lawyers for the boys could not be reached for comment. A year ago, three other Sacramento students implanted a keystroke-recording software on a teacher's computer to help them hack into the school's computer system to change their grades and discipline records. They were caught in October, expelled, and have been arraigned on felony charges that could bring sentences of up to three years.