1. Home
  2. /
  3. Trinket-python
  4. /
  5. Simple While Loop Example

Simple While Loop Example - Trinket-python Typing CST Test

Loading…

Simple While Loop Example — Trinket-python Code

Uses a while loop to count from 1 to 5.

i = 1
while i <= 5:
	print(i)
	i += 1

Trinket-python Language Guide

Trinket Python is a web-based platform that allows users to write, run, and share Python code directly in the browser. It simplifies programming education by combining an accessible coding environment with instant output and interactive projects.

Primary Use Cases

  • ▸Teaching Python programming to beginners
  • ▸Running interactive Python exercises online
  • ▸Embedding Python programs in educational websites
  • ▸Creating simple games, animations, and simulations
  • ▸Experimenting with Python without local setup

Notable Features

  • ▸Web-based Python IDE with instant execution
  • ▸Supports Python 3 and libraries for graphics and data
  • ▸Embed Python code into websites or learning platforms
  • ▸Interactive visual output for Turtle graphics and animations
  • ▸Shareable links and collaborative coding features

Origin & Creator

Trinket Python was developed by Trinket, Inc. to provide an accessible, cloud-based Python environment for education and online learning.

Industrial Note

Primarily used in K-12 and higher education programming courses, workshops, and online tutorials. Rarely used for large-scale software development.

More Trinket-python Typing Exercises

Hello World in Trinket (Python)Hello World with Turtle in Trinket (Python)Draw a Square with TurtleDraw a Triangle with TurtlePrint Numbers 1 to 10Simple Addition FunctionDraw a Circle with TurtleHello User InputDraw a Star with Turtle

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher