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.
Before you keep reading...
Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.
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.