Driving a zigzag path (Lego Dance): Difference between revisions

From wikiluntti
 
Line 16: Line 16:
<math>(-1)^2 = (-1)(-1) = 1</math>
<math>(-1)^2 = (-1)(-1) = 1</math>


<math>(-1)^4 = (-1)(-1)(-1) = -1</math>
<math>(-1)^3 = (-1)(-1)(-1) = -1</math>


<youtube>xdY5dqr-MPY</youtube>
<youtube>xdY5dqr-MPY</youtube>


== Exercises ==
== Exercises ==

Latest revision as of 21:05, 13 January 2022

Introduction

The plan and planned route

Use gyroscope to drive a zigzag path

Theory

The code

Use loop and the properties of exponentation: Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (-1)^0 = 1}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (-1)^1 = -1}

Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle (-1)^{2}=(-1)(-1)=1}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (-1)^3 = (-1)(-1)(-1) = -1}

Exercises