Grading college students on quizzes given at the beginning of every class, rather than on midterms or a final exam, increases both attendance and overall performance, scientists reported Wednesday.

The findings — from an experiment in which 901 students in a popular introduction to psychology course at the University of Texas took their laptops to class and were quizzed online — demonstrate that the computers can act as an aid to teaching, not just a distraction.

Moreover, the study is the latest to show how tests can be used to enhance learning as well as measure it. The report, appearing in the journal PLoS One, found that this “testing effect” was particularly strong in students from lower-income households.

Psychologists have known for almost a century that altering the timing of tests can affect performance. In the past decade, they have shown that taking a test — say, writing down all you can remember from a studied prose passage — can deepen the memory of that passage better than further study.