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?

you missed 1 essential part: have import math module first.

code: select all

import math print math.sin(math.pi/2)


raspberrypi



Comments

Popular posts from this blog

Static ip - Raspberry Pi Forums

arduino bug sur secteur, batterie, mais pas en usb?

What voltage is sent to the arduino GND when a transistor is used