I passed first time, after an intensive course, about 10 years ago. I can’t remember exactly the hours, but 40 sounds about right, as it was a full day, each day, Monday to Friday. That said, a couple of hours a day were spent in a classroom, in a group of about 10 students, just going over theory, and the wednesday afternoon was set aside for the theory & hazard test. Because I’d never driven at all, before the course, the company I went with also suggested that I did an afternoon of ‘basics’ with one of their instructors, on the Saturday before the actual course started.
Intensive courses are a quick way of learning, but there’s no guarantee of a pass and it’s definitely not for everyone. Of the 10 or so people I shared a classroom with, on my course, at least a couple didn’t even pass their theory tests and I think about half didn’t pass their practical. I’m pretty sure I got lucky, as I’d done a mock test a couple of days before the practical and failed that, with 3 major faults!
Whilst previous experience of driving will help, it’s not something you definitely need. I’d never sat behind the wheel of a car, then 10 days later I’d passed my test! The one thing that did help though, is having spent years cycling to work. That definitely helped my awareness of hazards, road positioning, understanding junctions, etc.