Computer Science homework help

Software Development

Chapter 5 Homework

Write a pseudocode solution for each of these problems.

  1. Design a While loop that lets that user enter a number. The number should be multiplied by 10, and the result stored in a variable named product. The loop should iterate as long as product contains a value less than 100.

 

  1. Design a Do-While loop that asks the user to enter two numbers. The numbers should be added and the sum displayed.  The loop should ask the user whether he or she wishes to perform the operation again.  If so, the loop should repeat; otherwise it should terminate. Computer Science homework help

 

  1. Design a For loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 ….. 100.

 

  1. Design a nested loop that displays 10 rows of # characters. There should be 15 # characters in each row.

ORDER   A PLAGIARISM FREE PAPER   NOW

  1. Convert this For loop to a While loop.

 

Declare Integer count

For count = 1 to 50

Display count

End For

 

  1. Find the error in the following pseudocode.

Declare Boolean finished = False

Declare Integer value, cube

While NOT finished

Display “Enter a value to be cubed.”

Input value;

Set cube = value ^ 3

Display value, “ cubed is “, cube

End While

 

  1. The programmer intended the following pseudocode to display the numbers 1 through 60, and then display the message “Time’s up!” It will not function as intended, however. Find the error.

 

Declare Integer counter = 1

Const Integer TIME_LIMIT = 60

While counter < TIME_LIMIT

Display counter

Set counter = counter + 1

End While

Display “Time’s up!”

 

  1. A bug collector collects bugs every day for seven days. Design a solution that keeps a running total of the number of bugs collected during the seven days.  The loop should ask for the number of bugs collected for each day, and when the loop is finished, the program should display the total number of bugs collected. Computer Science homework help

 

Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!

Solution:

15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.

WhatsApp us for help!