Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Need help with programming homework?

Need help with programming homework.?

Dylan asked 1 sec ago - 4 day left to answer

I really have no clue how to get started on doing this. Could anyone explain to me how to?

Desk check the following code on your own and then answer the questions. Give a single numeric answer to each question (e.g. 0, 1, 2, 3, etc.).

The log function takes two arguments -- first the number and then the base. So, for example, log(100,10) would yield 2 and log(1000,10) would yield 3.

1. Set base=2

2. Set num=1

3. While num<=16

4. -----Set val=log(num,base)

5. -----Display num+"\t"+val

6. -----Set num=num*2

7. End While

The loop executes [answer1] times:

The second time through the loop, the following is printed to the console:

The value in val the fourth time through the loop on line 5 is:

The value in num the fourth time through the loop on line 5 is:

1 Answer

Relevance
  • 7 years ago

    What problems are you having in answering this, specifically? Can you show us your work so far?

Still have questions? Get your answers by asking now.