Simulation modeling is an effective tool for solving problems that cannot be explained analytically or when data cannot be collected. This is done by simulating the observed behavior of a problem under study using a computer program. In math education, this can develop knowledge and fundamental competencies of simulation modeling at a higher level and foster its applications in everyday life. This study created learning activities for secondary school students to simulate the probabilistic behavior of random events using Python. 28 grade 12 students took part in these activities using appropriate scaffolding strategies and a powerful mathematical tool, Python. After completing the activities, student competency in simulating the probabilistic behavior of random events with Python was evaluated using rubrics and the factors of student enjoyment, perceived value, interest, and self-efficacy were determined through a Likert-scale questionnaire. The assessment results showed that the activities had a positive effect on student competencies and emotions. The outcomes of the study can serve guidelines for teachers who are interested in expanding the results for further student development.