Aidan Chiles completed 15 of 31 passes for 159 yards and two touchdowns to help Michigan State earn a 24-17 win over Purdue on Friday in East Lansing, Mich.Kay’Ron Lynch-Adams gained 85 yards on 18 carries for the Spartans (5-6, 3-5 Big Ten), who kept their hopes of bowl-eligibility alive. Nate Carter had touchdowns rushing and receiving as the Spartans ended a three-game losing streak.Hudson Card went 26 of 46 passing for a season-high 342 yards for Purdue (1-10, 0-8), which has lost 10 straight. Card threw one touchdown pass and one interception.Trailing by 21 at halftime, Purdue cut Michigan State’s lead to 24-10 with 5:49 remaining in the third quarter on a 2-yard touchdown run by Devin Mockobee, which finished off a 10-play, 73-yard drive.Purdue cut the deficit to 24-17 with 13:54 remaining in the game on a 7-yard touchdown pass from Card to Max Klare.The Boilermakers had three drives to tie the game, but they ended on a punt, an interception and a turnover on downs at their own 47-yard line with more than three minutes remaining.The Spartans then gained two first downs and ran out the clock.Michigan State took a 17-3 lead with 7:50 left until halftime on a 3-yard touchdown run by Carter on third-and-goal.