Diontrelle T. Stewart of Lockport pleaded guilty Tuesday in Niagara County Court to two felonies, while a third felony case is still open against him.
Stewart, 17, who listed addresses on Pine and Walnut streets, faces a possible seven years in prison from Judge Sara Sheldon.
Stewart pleaded guilty to attempted second-degree criminal possession of a weapon for having a loaded handgun Aug. 18 on Parkside Place in Youngstown.
He also admitted to attempted fourth-degree criminal possession of a controlled substance for having nearly an ounce of crack cocaine June 27, when he was a passenger in a car stopped by Lockport police.
Charges in a Sept. 29 Lockport burglary remain pending and may be resolved later this month, Assistant District Attorney Peter M. Wydysh said.