User Manual
Print

Taking the Square Root

Square Root

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>count</variable></variables><block type=\"math_op3\" disabled=\"true\" x=\"-22\" y=\"472\"><value name=\"x\"><shadow type=\"math_number\" disabled=\"true\"><field name=\"NUM\">0</field></shadow></value></block></xml>"}
				
			

This block is used to take the square root of the value.

Parameters: Condition: 

            • Number (Default: 0)
            • Square root (Default)/sin/cos/tan/atan2/integer ÷/integer ×

Output: Number
Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"basic_consoleLogNum\"><value name=\"num\"><block type=\"math_op3\"><value name=\"x\"><shadow type=\"math_number\"><field name=\"NUM\">-10</field></shadow></value></block></value></block></statement></block></xml>"}
				
			

The output:

Absolute - Output