In this paper, we present our experience of teaching medical students with the use of computers. An expert system was developed as a computer aided learning system for medical students and doctors to learn about family planning. Our expert system is a rule-based one in Arity Prolog, and can be run under an IBM-PC. Its rule-based representation of knowledge and explanation capability have been found to be very useful and stimulating in the learning process. In addition to being a computer aided learning system, it can also be used as a supporting tool to the medical doctors. We also describe the methodology of building up our expert system.