Down 30-18 at halftime and still trailing 33-20 with 17:43 remaining, the Quakers (6-18, 3-4) scored nine unanswered points, six by Brooks.
Penn missed its first field goal of the second half, then went 16 of 20 the rest of the way while also making 15 of 19 free throws.
Tied at 48 with 4:44 left, Lewis and Miles Cartwright made back-to-back layups and Lewis hit a 3-pointer for a seven-point cushion.
The Big Green (6-16, 2-6) could get no closer than five thereafter.
Lewis, who had scored a combined 14 points over the Quakers' previous 11 games, was 5 of 6 from the field.
Gabas Maldunas, whose 19 points and 10 rebounds led the Big Green, surpassed 500 career points in two seasons.
Former Kentucky guard Ed Davender, the only Wildcat with at least 1,500 points and 400 assists, has died. He was 49.
Guard Naz Mitrou-Long, whose 2015-16 season ended in December due to hip problems, has been granted a hardship waiver for the coming season, Iowa State said.
As the Sooners look to life without superstar Buddy Hield and his sidekicks, it's clear their unseasoned players will need to grow up fast.