Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function txt(x,y,t)
- term.clear()
- term.setCursorPos(x,y)
- write(t)
- end
- txt(1,1,"X: ")
- local x=read()
- txt(1,1,"Mean: ")
- local u=read()
- txt(1,1,"Standard Deviation: ")
- local sDev =read()
- local pi = math.pi
- local e = 2.718281828
- local result = ((1)/(sDev*math.sqrt(2*pi)*e))^(-0.5*(((x-u)/sDev)^2))
- txt(1,1,"val: "..result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement