Search arXivSearch

arXiv · 2507.05734

scicode-widgets: Bringing Computational Experiments to the Classroom with Jupyter Widgets

Abstract

"Computational experiments" use code and interactive visualizations to convey mathematical and physical concepts in an intuitive way, and are increasingly used to support ex cathedra lecturing in scientific and engineering disciplines. Jupyter notebooks are particularly well-suited to implement them, but involve large amounts of ancillary code to process data and generate illustrations, which can distract students from the core learning outcomes. For a more engaging learning experience that only exposes relevant code to students, allowing them to focus on the interplay between code, theory and physical insights, we developed scicode-widgets (released as scwidgets), a Python package to build Jupyter-based applications. The package facilitates the creation of interactive exercises and demonstrations for students in any discipline in science, technology and engineering. Students are asked to provide pedagogically meaningful contributions in terms of theoretical understanding, coding ability, and analytical skills. The library provides the tools to connect custom pre- and post-processing of students' code, which runs seamlessly "behind the scenes", with the ability to test and verify the solution, as well as to convert it into live interactive visualizations driven by Jupyter widgets.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Alexander Goscinski, Taylor James Baird, Dou Du, João Prado, Divya Suman, Tulga-Erdene Sodjargal, Sara Bonella, Giovanni Pizzi, Michele Ceriotti. 2025-07-08. scicode-widgets: Bringing Computational Experiments to the Classroom with Jupyter Widgets. https://arxiv.org/abs/2507.05734

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Addressing misconceptions in university physics: A review and experiences from quantum physics educators

Students often begin physics courses with misconceptions rooted in everyday experience and intuition, which can be resistant to change. While research has identified strategies for addressing misconceptions across physics, it remains unclear whether different domains, like classical and quantum physics, require different approaches. Quantum concepts can pose different representational and mathematical demands, while both domains require instructors to elicit and develop students' reasoning. To support discussion of these instructional challenges, we organize selected literature on addressing misconceptions in physics education and summarize instructors' accounts. The overview groups 122 distinct works into four categories, with further subcategories. A preliminary framework developed from existing review literature informed the interview guide. We interviewed 12 instructors from the University of Waterloo's Institute for Quantum Computing and the Perimeter Institute, who have collectively taught over 100 quantum courses. The accounts describe difficulties involving instructional representations, prerequisite knowledge, and the interpretation of students' reasoning, alongside reported diagnostic and instructional responses. We draw these accounts and the literature together as questions for instructional planning. The report does not resolve the intended classical--quantum comparison or establish comparative instructional effectiveness.

physics.ed-ph

Johann Bernoulli's analysis of elastic collisions (a teaching sequence to introduce the dynamic law thereby inspired)

In order to explain an elastic collision, Johann Bernoulli considered two bodies connected by a spring. Motion is defined as a succession of states of rest. Then, considering the spring to be a lever with a body at each extremity, the laws of equilibrium imply that `motion' is described by the time variation of the (common) quantity of motion of the bodies; the dynamic law is thus deduced. This inspires a teaching sequence to introduce the dynamic law (in one dimension) in introductory physics course; we call it ``bernoullian sequence''.

physics.ed-ph

Design and Initial Evaluation of a Photovoltaics-focused Course-based Undergraduate Research Experience in Physics

Traditional physics laboratory courses often focus on experiments with well-known results, limiting students' engagement in authentic scientific practices. Course-based undergraduate research experiences (CUREs), where students engage in real research with unknown outcomes, have been shown to support positive student outcomes, such as increased self-efficacy, persistence, and engagement in scientific practices. However, discipline-specific studies of CUREs in physics remain limited. We describe the development, structure, and initial implementation of a photovoltaics-focused CURE in a second-year undergraduate physics laboratory course at the University of Colorado Boulder. To examine how students experienced the course, we analyzed end-of-semester reflection assignments using the five CURE components (i.e., scientific practices, discovery, relevance, collaboration, and iteration), as well as established dimensions of research authenticity, as analytic frameworks. Students described experiences associated with all five CURE components, with collaboration, relevance, and scientific practices appearing most prominently in their reflections. Students also associated authentic research with meaningful scientific contribution, engagement in authentic scientific practices, and navigating the uncertainty and setbacks inherent in research, although fewer explicitly identified themselves as researchers or scientists. A subset of students additionally connected the course to their immediate thinking about future academic and professional pathways. This work contributes both a discipline-specific model for implementing CUREs in experimental physics laboratory courses and provides insight into how students interpret and experience authentic research within this course context.

physics.ed-ph