数字行绝对值
章节大纲
-
The Distance Problem
::远程问题When you are measuring distances, a common problem can arise. In this interactive, you will try to guess a number between 1 and 20. Then you will use absolute value to describe how close your guess was to the actual answer.
::当您测量距离时, 会出现一个共同的问题。 在此互动中, 您将尝试猜测一个在 1 和 20 之间的数字, 然后您将使用绝对值来描述您的猜测离实际答案有多近 。+Do you want to reset the PLIX?Discussion Question
::讨论问题How did you determine how much you were off by?
::你是怎么确定 你花了多少钱的?
Absolute Value
::绝对值In the opening activity, you saw that a difference needs to be calculated in different ways depending on whether the first value is greater or less than the second value. This problem can be solved using absolute value. This concept is often explored by imagining distance above and below zero by comparing it to sea level. The distance of a number from zero (sea level) can be calculated using absolute value.
::在开始活动时, 您看到差异需要根据第一个值大于或小于第二个值的不同方式来计算。 这个问题可以用绝对值来解决。 这一概念通常通过想象零以上或零以下的距离, 将其与海平面进行比较来探索。 数字与零( 海平面)的距离可以用绝对值来计算 。The absolute value of a number is the distance of that number from zero. The absolute value of 23 is 23 because it is 23 units from zero. The absolute value of -12 is 12 because it is 12 units from zero. Absolute value will never be negative because it represents the distance of a number from zero with no reference to direction. Imagine that you have to walk to zero from that number and the absolute value represents how many steps you would take. The absolute value symbol is written using a straight vertical line on either side of the number or expression. The absolute value of 5 is written as |5|.
::数字的绝对值是数字从零的距离。 绝对值23是23, 因为它是零的23 个单位。 绝对值 -12 是零的12 个单位。 绝对值永远不会是负的, 因为它代表数字从零到零的距离, 没有参考方向。 想象一下, 您必须从该数字走到零, 绝对值代表您要采取多少步骤。 绝对值符号是用数字或表达式的两侧的直垂直线写成的。 绝对值为 5 的绝对值是 5 。For the next interactive, you will see how absolute value measures the distance or how many steps away a positive or negative integer is from zero.
::对于下一次互动,您将看到绝对值如何测量距离,或者从零到零多少步距离正或负整数。+Do you want to reset the PLIX?When solving an absolute value expression, use the order of operations. Absolute value symbols are treated like parenthesis. Simplify what is inside the absolute value first and then take the absolute value of the resulting value. Then continue with the operations outside of the absolute value. Much like with parenthesis, a number next to an absolute value symbol means that it is being multiplied by the value of the absolute value.
::当解析绝对值表达式时,请使用操作的顺序。绝对值符号被当作括号处理。先简化绝对值中的符号,然后取出结果值的绝对值。然后在绝对值之外继续操作。与括号非常相似,一个绝对值符号旁边的数值表示它正乘以绝对值的数值。Example
::示例示例示例示例Evaluate |-6.17|
::评价____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________Answer: The absolute value of 6.17 is 6.17 because it is 6.17 units away from zero.
::答复:6.17的绝对值为6.17,因为从零为6.17单位。The absolute value symbols have the same power as parenthesis when evaluating expressions using the order of operations.
::绝对值符号在使用操作顺序评价表达式时具有与括号相同的功率。Example
::示例示例示例示例1. |2(3) - 5|
|2(3) - 5| = |6 - 5| = |1| = 1
Answer: 1
::答复:12. 5 + 2 |-7|
5 + 2 |-7| = 5 + 2 x 7 = 5 + 14 = 19
::5 + 2 + 2 + 7 = 5 + 2 x 7 = 5 + + 14 = 19Answer: 19
::答复:19
Healthy Animals
::健康动物During a physical, one of the methods that veterinarians use to test the health of animals is their weight.
::在物理期间,兽医用来检验动物健康的方法之一是其体重。Answer the questions below to explore how this is done.
::回答下列问题,以探讨如何做到这一点。
Making a Robot Part 4
::使机器人第4部分成为机器人第4部分M ultiple lessons in this book have been exploring how to program a robot to move. At this point, the robot understands the three functions below:
::这本书中的多个课程一直在探索如何编程机器人移动。此时此刻,机器人理解以下三个函数:-
steps
- This command will move the robot n steps forward or n steps backward. The command steps(4) will move the robot 4 steps forward and the command steps(-2) will move the robot 2 steps backward.
::步骤- 此命令会向前移动机器人 n 步或向后移动 n 步。 命令步骤(4) 会向前移动机器人 4 步, 命令步骤( 2) 会向后移动机器人 2 步 。
-
location() - This command will tell you the current location of the robot
::位置 () - 此命令会告诉您机器人当前的位置 -
reset() - This command will return the robot to the starting position and will set the total number of steps taken to 0.
::重置 () - 此命令将把机器人返回起始位置, 并将将所采取步骤的总数设置为 0 。
The next function that we need to program is total() which will return the total number of steps taken by the robot in any direction. How can you use your knowledge of absolute value to do this?
::我们需要编程的下一个函数是总 () , 它将返回机器人在任何方向上采取的步骤的总数。 您如何使用您对绝对值的了解来做到这一点 ?In the interactive below, you will move the robot forward and backward a certain number of steps, describe its location using positive and negative numbers , and use absolute value to reset it back to its original location.
::在下文互动中,您将把机器人往前移,往后移一些步骤,使用正数和负数描述其位置,并使用绝对值将机器人重置回原位置。+Do you want to reset the PLIX?Discussion Questions
::讨论问题 讨论问题The next step is to build the a function which will return the number of steps taken by the robot. What would this function look like? How would the function return the number of steps taken?
::下一步是构建一个函数, 该函数将返回机器人所采取步骤的数量。 这个函数会是什么样子? 该函数将如何返回所采取步骤的数量 ?Summary -
The
absolute value
of a number is the distance of that number from zero.
::一个数字的绝对值是该数字与零的距离。 -
Use the symbol " | " to represent absolute value. For example:
::使用符号 " " 表示绝对值。例如:2
-
steps