introduction to touchdevelop math basic arithmetic operations disclaimer: this document is provided...
TRANSCRIPT
introduction to touchdevelop
mathbasic arithmetic operations
Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and Windows Live are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners.
introduction to touchdevelop
numbers,+,*,…o use the arithmetic pad
to enter +, -, /, *o use the number pad to
enter numberso more in math.o floating point numbers
like your calculator
✿ double precision
introduction to touchdevelop
matho scientific calculator services
• trigonometry: sin, cos, acos, …
• calculus: pow, √, loge, log10,…
• constants: π(pi), g(ravity),…
• numerics: floor, ceil, round,…
• useful: random,…
✿ https://www.touchdevelop.com/help/api/200060/math
introduction to touchdevelop
user inputo use wall→ask number to get a number
from the user
var x := wall→ask number(“enter x”)x →post to wall
☀ you can also add arguments to the action
introduction to touchdevelop
exercisesouse a different action for each exercise
► “compute the square root, i.e. √(x), of x given by the user”
► “compute the surface of a rectangle with its width and height from the user”
► “compute the root of ax + b, given a and b from the user”
► “compute the surface of a circle given the radius from the user”