A kind professor can sometimes use their administrative privileges to create a "testing" account, which they can pass on to a student. Many of the courses I took in my undergrad degree required electronic components which may cost as much as the textbook.