Study the pseudocode and answer the following questions. Line numbers have been added to help you. a)
Question:
Study the pseudocode and answer the following questions. Line numbers have been added to help you.
a) Give the line number of:
i) An assignment statement
ii) A selection
iii) An iteration.
b) Complete an identifier table for the algorithm.
c) Extend the algorithm to only allow four tries for a correct choice.
Transcribed Image Text:
01 REPEAT 02 OUTPUT "Menu Temperature Conversion" 03 OUTPUT "Celsius to Fahrenheit 1" 04 OUTPUT "Fahrenheit to Celsius 2" 05 OUTPUT "Exit 3" 06 OUTPUT "Enter choice" 07 IF Choice 1 OR Choice = 2 08 THEN 09 OUTPUT "Enter temperature" 10 INPUT Temperature 11 IF Choice 1 12 THEN ConvertedTemperature + 1.8*Temperature + 32 13 14 ELSE 15 ConvertedTemperature + (Temperature 32) * 5 / 9 16 ENDIF 17 OUTPUT "Converted temperature is ", convertedTemperature 18 ELSE 19 IF Choice <> 3 20 THEN 21 OUTPUT "Error in choice" 22 ENDIF 23 ENDIF 24 UNTIL Choice = 3
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 70% (10 reviews)
ANSWER a i Line 16 ii Line 7 iii Line 1 b Identifier Type Purpose Choice Int...View the full answer
Answered By
Dennis Nyangau
I have been tutoring for several years now, and I absolutely love it! I love being able to help students one-on-one and see them succeed. It is so gratifying to see a student understand a concept that they were struggling with before. I also enjoy getting to know my students and helping them to reach their full potential.
0.00
0 Reviews
10+ Question Solved
Related Book For
Cambridge International AS & A Level Computer Science
ISBN: 9781510457591
1st Edition
Authors: David Watson, Helen Williams
Question Posted:
Students also viewed these Computer science questions
-
Choose the true statement: a. Duration may not be used to determined the risk of a price change of the financial instrument due to the changes of interest rates b. The higher the duration of the...
-
a. After 3 points have been added to every score in a sample, the mean is found to be M = 83 and the standard deviation is s = 8. What were the values for the mean and standard deviation for the...
-
a. After 3 points have been added to every score in a sample, the mean is found to be M = 83 and the standard deviation is s = 8. What were the values for the mean and standard deviation for the...
-
Requirement 1 Two contribution format statements: current and proposed based on business decision. Requirement 2 For each option current and proposed business decision) calculate the following: a....
-
What percentage of hospitals provide at least some charity care? This problem is based on information taken from State Health Care Data: Utilization, Spending, and Characteristics (American Medical...
-
1. Was MaloneCo justified in relying on Ralph and Elies assurances that CenterRock was continuing to pursue the original contract? 2. The court requires a connection or relationship for...
-
Here is the letter written by Sherron Watkins, CPA. Is she a whistleblower? Did she commit a discreditable act under AICPA Rule 501? Dear Mr. Lay, Has Enron become a risky place to work? For those of...
-
Pip Squeaks Inc. is a manufacturer of furnishings for infants and children. The company uses a job order cost system. Pip Squeaks Work in Process Inventory on April 30, 2010, consisted of the...
-
A jewelry store buys small boxes in which to wrap items that they sell. The diagram below shows one of the boxes. Find the lateral area and the surface area of the box to the nearest whole number. 7...
-
Bell Company??s fiscal year ends on June 30. The following accounts are found in its job order cost accounting system for the first month of the new fiscal year. Other data:1. On July 1, two jobs...
-
Computer programs have to evaluate expressions. Study the sequence of pseudocode statements. Write down the value assigned to each variable. a) Perimeter b) Area c) Z d) A DECLARE h, w, r,...
-
Abstract data types (ADTs) are collections of data and the operations used on that data. Explain what is meant by a) Stack b) Queue c) Linked list.
-
Write a method called scaleByK that takes an ArrayList of integers as a parameter and replaces every integer of value with copies of itself. For example, if the list stores the values [4, 1, 2, 0, 3]...
-
What monthly rate of interest must be paid on a sum of 880 if it is to accumulate to 1040 after 5 months? Final answer should be rounded to 2 decimal places. Enter your answer: %
-
Discuss the various Inter-Process Communication (IPC) mechanisms such as message queues, shared memory, and pipes. What are the use cases and advantages of each, and how do they ensure...
-
Due to shortages in the United States milk supply, Congress passed a law governing the production and sale of milk. The law required "anyone who produced, distributed, or sold milk" to obtain a...
-
Quilcene Oysteria Flexible Budget For the Month Ended August 31 Actual pounds (q) 7,100 Revenue ($4.05q) $ 28,755 Expenses: Packing supplies ($0.25q) 1,775 Oyster bed maintenance ($3,400) 3,400 Wages...
-
A company has the following information Sales volume Sales price A favorable variance of $5,400 is which variance? Budgeted 50,000 units $4.00/unit Actual 54,000 units $4.10/unit
-
Why do economists refer to the methodology for analyzing oligopolies as game theory?
-
A certain Christmas tree ornament is a silver sphere having a diameter of 8.50 cm. Determine an object location for which the size of the reflected image is three-fourths the size of the object. Use...
-
In this exercise, we will examine space/time optimizations for page tables. The following list provides parameters of a virtual memory system. 1. For a single-level page table, how many page table...
-
In this exercise, we will examine how replacement policies impact miss rate. Assume a 2-way set associative cache with 4 blocks. To solve the problems in this exercise, you may find it helpful to...
-
To support multiple virtual machines, two levels of memory virtualization are needed. Each virtual machine still controls the mapping of virtual address (VA) to physical address (PA), while the...
-
31 BT E R ole]1i 1o 2111Trial balancev For the Quarter Ended May 31, 2022For the Year Ended May 31, 2022May 31, 2022 Totals $ $ Current Attempt in Progress Julia Dumars is a licensed CPA. During the...
-
Chief Customer Officer Jayden Hayden has asked sales analyst Paige Sage to analyze the company's Western Kentucky district. Paige intends to calculate ROAM for the district. She has compiled the...
-
Which of the following statements is correct?If the demand curve for a firm's stock is relatively flat, the firm will have a more difficult time raising alarge amount of new equity funds for...
Study smarter with the SolutionInn App