Python math library - Raspberry Pi Forums
i bought book simon monk called "programming raspberry pi", and
i'm trying learn how programs trig functions , file outputs.
book says math.sin(math.pi/2) return 1.0, example. however,
error indicating math library unknown. ideas i'm
doing wrong?
i'm trying learn how programs trig functions , file outputs.
book says math.sin(math.pi/2) return 1.0, example. however,
error indicating math library unknown. ideas i'm
doing wrong?
you missed 1 essential part: have import math module first.
code: select all
import math print math.sin(math.pi/2)
raspberrypi
Comments
Post a Comment