7 Matching Annotations
  1. Apr 2019
  2. Jan 2019
    1. additive identity and multiplicative identity

      The "Additive Identity" is 0, because adding 0 to a number does not change it:

      a + 0 = 0 + a = a

      The "Multiplicative Identity" is 1, because multiplying a number by 1 leaves it unchanged:

      a × 1 = 1 × a = a

    2. def square(x): runningtotal = 0 for counter in range(x): runningtotal = runningtotal + x

      return runningtotal
      

      The indentation of return runningtotal is very important because I made a mistake by indenting it to 4 more spaces and the code wasn't working**

    1. All I know is that when I use a synthesizer to make music, a sine wave is used to produce a particular sound... Now, to reproduce that sine wave by drawing it with a turtle is a completely different matter.

    2. setworldcoordinates

      I know what this does but I just can't understand how to make the turtle behave like a sine wave

    1. <class '__main__.Turtle'>

      This is what I get when I print a variable which contains a turtle. However, with a python ide called Thonny, the output is different

      <class 'turtle.Turtle'> (The code is here but for some weird reason it cannot be seen!). The output for the class is just turtle.Turtle

      I wonder why...