This paper demonstrates how A-Prolog can be used to solve the problem of nonmonotonic inductive learning in the context of the learning of the behavior of dynamic domains. Nonmonotonic inductive learning is an extension of traditional inductive learning, characterized by the use of default negation in the background knowledge and/or in the clauses being learned. The importance of nonmonotonic inductive learning lies in the fact that it allows to learn theories containing defaults and ultimately to help automate the complex task of compiling commonsense knowledge bases.