import math._ def f(x:Double):Double={ // 3*x*x+x // or 3*math.pow(3,2)+x sin(x) } //> f: (x: Double)Double clear ; jumpTo(-10*10,f(-1)*100) for(x <- -10.0 to 10 by 0.1) { //print(x) ; print("\t") ; println(f(x)) moveTo(x*10,f(x)*100) }