Saturday, June 21, 2025

Numworks vs TI-83 Premium/TI-84 Plus CE Python: Drawing and Equals Sign Using Turtle

Numworks vs TI-83 Premium/TI-84 Plus CE Python: Drawing and Equals Sign Using Turtle


Even though many graphing calculators now have Python, and many of them have the same-named modules, the modules and commands can differ between calculators. It is very important to consult the calculator’s manual and the calculator’s help facilities to see what the particular calculator can and can not do.


The goal of halfequ.py is to draw an equals sign using the Turtle module.




Numworks: halfequ.py


from math import *
from turtle import *

# drawing equals sign
# Numworks

def hequ():
  for i in range(10):
    setheading(0)
    forward(120)
    right(90)
    forward(1)
    right(90)
    forward(120)
    left(90)
    forward(1)

# draw equals sign

speed(7)
penup()
goto(-60,-20)
pendown()
hequ()

penup()
goto(-60,40)
pendown()
hequ()

penup()
goto(0,0)
setheading(0)


TI-84 Plus CE Python/TI-83 Premium Python Edition: HALFEQU.py


from turtle import *
t=Turtle()

def hequ():
  for i in range(10):
    t.setheading(0)
    t.forward(120)
    t.right(90)
    t.forward(1)
    t.right(90)
    t.forward(120)
    t.left(90)
    t.forward(1)

t.speed(7)
t.penup()
t.goto(-60,-20)
t.pendown()
hequ()

t.penup()
t.goto(-60,40)
t.pendown()
hequ()

t.penup()
t.home()
t.done()


Notes


* The turtle module is an add-on module for the TI-84 Plus CE/TI-83 Premium Python Edition, which requires a separate download.

* The Numworks turtle does not require named object of turtle like TI does. The TI requiring a “named” turtle may open the possibility of having more than one turtle.

* The TI’s command, t.home(), puts the turtle at point (0,0) with an orientation of 0°.

* In TI’s turtle, t.done() must be at the end of the code in order for the drawing to commence.

* In Numworks, the turtle is represented as a turtle, while the TI’s turtle is represented as an arrow.

* In Numworks, the turtle can be displayed or hidden by the showturtle() or hideturtle() command, respectively.

* Numworks’ drawing range: x = [-160, 160], y = [-111, 111].

* TI’s turtle drawing range: x = [-160, 160], y = [-120, 120].


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Numworks vs TI-83 Premium/TI-84 Plus CE Python: Drawing and Equals Sign Using Turtle

Numworks vs TI-83 Premium/TI-84 Plus CE Python: Drawing and Equals Sign Using Turtle Even though many graphing calculators now have Pyt...