Creating practice questions for programming learning is not an easy job. It requires the instructor to diligently organize heterogeneous learning resources. Although educational technologies have been adopted across levels of programming learning, programming question generation (PQG) is still predominantly performed by instructors without advanced technological support. This study proposes a knowledge-based PQG model that aims to help the instructor generate new programming questions and expand the assessment items by the Local Knowledge Graph and Abstract Syntax Tree. A group of experienced instructors was recruited to evaluate the PQG model and expressed significantly positive feedback on the generated questions.