![]() Here the * operator has a precedence over the sqrt operator. Note − print 60 * sqrt 2 and print sqrt 2 * 60 produce different answers. Log10 − It takes the logarithm to base 10 of its one argument.įollowing screenshot shows an example of the above commands with their respective output.Īrithmetic operators have a precedence that determines the order with which they are evaluated. Ln − It takes one argument and returns its natural logarithm.Įxp − It takes one argument and computes e to that power, e is the natural number 2.718281828. Power − It takes two arguments, call them ‘a’ and ‘b’, and generates a to the b power. Sqrt − It takes one non-negative argument and returns its square root. Examples given in the following screenshot demonstrate the same. With the print command, the result of an arithmetic operation can be used and printed in the command window. If you don't do something with the result, such as print it, Logo will show an error. Each of these operations produces a result. Logo provides the usual arithmetic operations of addition, subtraction, multiplication and division, denoted by the symbols +, -, *, /. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |