Teachers at the school said that this year, they had noticed a better attitude among the students, which they attributed to the incentive program. One recent day, fourth graders talked eagerly about the computer games they have been playing to get ready for this week’s state math exam. During the school’s recent winter break, dozens of students showed up for extra tutoring to prepare.

“My teacher told me to study more, so I study,” said Jazmin, who had already taken eight standardized exams this school year. “I did multiplication tables. I learned to divide.” When asked why she took so many tests, Jazmin replied earnestly, “To show them we have education and we learn stuff from education and the tests.”

The students spoke excitedly about their plans for the money. Several boys said they were saving for video games. Abigail said she would use it to pay for “a car, a house and college,” apparently unaware that the roughly $100 she’s earned this school year might not stretch that far. Another little girl said she would use the money simply for food. When asked to elaborate, she answered quietly, “Spaghetti.”

Changing the attitudes of seventh graders seems to be more complicated. At J.H.S. 123 in the Bronx, for example, a seventh-grade English class was asked one morning if there were too many standardized tests. Every hand in the room shot up to answer with a defiant yes. But at the same time, the students all agreed that receiving money for doing well on a test was a good idea, saying it made school more exciting, and made doing well more socially acceptable.

“This is the hardest grade to pass,” said Adonis Flores, a 13-year-old who has struggled in his classes at times. “This motivates us better. Everybody wants some money, and nobody wants to get left behind.”

Would it be better to get the money as college scholarships? Shouts of “No way!” echoed through the room. “We might not all go to college,” one student protested.

Image Masudur Rahman receives his earnings record from Dalia Johnson, the director of the middle school at Public School 188 in Manhattan. The amount is determined by his scores on reading and math tests. Credit... Annie Tritt for The New York Times

So is doing well in school cool? A few hands slowly inched up. But when their principal, Ms. Connelly, asked what could be done to make being the A-plus student seem as important as being the star basketball player, she was met with silence.