Write Code QuestionsΒΆ

Warning

Be careful not to create infinite loops, as they will cause the page to freeze.

The code below is supposed to print an estimate of the square root of a number (target). You are given an initial guess of 2. However, the indention is wrong on 4 lines. Fix these errors to find the estimate.

Create code to print an estimate of the square root of a number (target). You are given an initial guess of 2.

Rewrite the following code to use a while loop instead of a for loop to calcultae the value of the ten factorial.

Using the blocks below, create code to calculate the value of the ten factorial.

You have attempted of activities on this page