geometer.py

Created by steveg1cmz

Created on August 09, 2023

577 Bytes

geometer: A simple protractor. (A straight edge would be nice if we knew the screen size). Its not the neatest, but should you need one… Tested on: Numworks 19.4.0 Numworks 20.3.2


"""Geometer: Protractor
"""

from turtle import *
crid="Geometer"

hideturtle()
penup()
goto(-160,-118)
write(crid)
d=90
Listed={90,180,270,360}
goto(0,-d)
pendown()
circle(d)
goto(0,0)

#standard protractor
color("blue")
for k in range (0,360,15):
  setheading(k)
  penup()
  forward(d-30)
  pendown()
  forward(30)
  penup()
  goto(0,0)

for k in range (0,360,15):
  setheading(k)
  penup()
  forward(d)
  write(str(k))
  goto(0,0)

# highlight listed degrees
pendown()
color("red")
for k in Listed:
  setheading(k)
  forward(d)
  write(str(k))
  goto(0,0)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.