# Computational thinking as a mediator between modeling self-efficacy and flexible thinking in pre-service science teachers

**Authors:** Rumeysa Beyazhancer, Salih Cepni

PMC · DOI: 10.3389/fpsyg.2026.1699956 · Frontiers in Psychology · 2026-02-18

## TL;DR

This study shows how computational thinking connects self-efficacy and flexible thinking in future science teachers.

## Contribution

It identifies computational thinking as a mediator linking modeling self-efficacy to flexible thinking.

## Key findings

- Modeling self-efficacy significantly predicts computational thinking skills.
- Computational thinking significantly predicts flexible thinking.
- Computational thinking partially mediates the relationship between self-efficacy and flexible thinking.

## Abstract

In psychology, constructs such as self-efficacy, cognitive flexibility, and computational thinking (CT) are recognized as mechanisms that explain how individuals adapt to uncertainty and complexity. Self-efficacy regulates both motivation and cognition, while flexible thinking reflects the adaptive capacity to generate alternatives and cope with ambiguity. CT extends beyond technical domains as a cognitive framework that structures processes such as abstraction and reasoning. This study explores the mediating role of CT in the relationship between mathematical modeling self-efficacy and flexible thinking among pre-service science teachers.

Participants were 244 pre-service science teachers from two state universities in Türkiye. Data were gathered using the Mathematical Modeling Self-Efficacy Scale, the Computational Thinking Skills Scale, and the Flexible Thinking in Learning Scale. Confirmatory factor analyses supported validity and reliability. PROCESS Macro (Model 4) tested mediation with controls for gender and grade.

Modeling self-efficacy significantly predicted CT (β = 0.375, p < 0.001), and CT significantly predicted flexible thinking (β = 0.368, p < 0.001). The direct effect of modeling self-efficacy on flexible thinking decreased from β = 0.512 to β = 0.378 when CT was included, indicating partial mediation. Bootstrap analysis confirmed the indirect effect (0.224, 95% CI [0.150, 0.298]).

Findings indicate that self-efficacy beliefs influence adaptive cognitive capacities both directly and indirectly through CT. CT functions as a psychological bridge, linking self-efficacy with flexible thinking, and highlights the importance of integrating these constructs in educational psychology to foster resilience, adaptability, and coping with complexity.

## Full-text entities

- **Diseases:** CT (MESH:C000719218)
- **Chemicals:** CT (-)
- **Species:** Meleagris gallopavo (common turkey, species) [taxon 9103], Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12957265/full.md

## Figures

3 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12957265/full.md

## References

98 references — full list in the complete paper: https://tomesphere.com/paper/PMC12957265/full.md

---
Source: https://tomesphere.com/paper/PMC12957265