Message Boards Message Boards

0
|
6280 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

User Input

Posted 4 years ago

Hey there, I am a complete beginner, so I wanted to start of with something simple. I tried to code the quadratic formula where a, b and c are user inputs: https://www.wolframcloud.com/obj/7135b316-01d4-4005-a110-ced18d8438c0.

While coding, I can just click shift+enter and the computer will ask me to give the 3 inputs. I published the code, but when I clicked the link, the computer won't ask me to give 3 inputs, does someone know why this is and how to make it work?

Thanks in advance.

POSTED BY: Daan Pals
3 Replies

If you need interactivity, you should try FormFunction and friends instead, e.g.:

CloudDeploy[
 FormFunction[{"a" -> "Number", "b" -> "Number", "c" -> "Number"},
  Plot[#a x^2 + #b x + #c, {x, -10, 10}] &]]
POSTED BY: Victor K
Posted 4 years ago

Thanks, I'll try that.

POSTED BY: Daan Pals
Posted 4 years ago

I am sorry, but I would once again like to ask something. I coded it, but the graph is very small, I'd like it to be bigger. Do you know how to do that? I already tried image size, but that doesn't seem to work.

CloudDeploy[
FormFunction[{"a" -> "Number", "b" -> "Number", "c" -> "Number"},
StringForm["x = `` or x = ``.",(-#b-Sqrt[#b^2-4*#a*#c])/(2*#a),(-#b+Sqrt[#b^2-4*#a*#c])/(2*#a)]
Plot[#a*x^2+#b*x+#c,{x,-#b-Sqrt[((#b)^2-4*#a*#c)]/(2*#a),-#b+Sqrt[((#b)^2-4*#a*#c)]/(2*#a)}]&]]

Thanks in advance.

POSTED BY: Daan Pals
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract