Lab 2: Problem Solving Concepts Diploma in Programming and Computer Science 1. Answer to the following...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Lab 2: Problem Solving Concepts Diploma in Programming and Computer Science 1. Answer to the following questions: N Question 1 An algorithm is a set of instructions designed to perform a specific task. 2 The Sequence Flowchart is a binary decision block that provides two separated branches of processes. 3 To assign an initial value in pseudocode we use INITIALIZE or SET. 4 In pseudocode, the WHILE loop is a pre-test loop. 5 The logic-time errors occur when the programmer fails to obey one of the grammar rules of the language. 6 The Run-time errors occur whenever the program instructs the computer to do something that it is either incapable or unwilling to do. 2. Trace the following flowchart and tell what it will display. What is the last value of i? How many times the loop will be repeated? False STOP START i<10 >=0 True PRINTI ifi-1 T/F 3. Draw a flowchart and write its pseudocode to calculate the product of two numbers A and B entered by user. 4. Draw a flowchart and write its pseudocode to convert temperature from Celsius to Fahrenheit. F = (Cx 2) + 30 5. Draw a flowchart and write its pseudocode to determine if a given integer is even or odd. 6. Draw a flowchart and write its pseudocode to determine for a given number of month [1..12] is in which season {winter, spring, summer or autumn). 7. Draw a flowchart and write its pseudocode to read three integers, determine which has greater value and then print this value if it is even. 8. Draw a flowchart and write its pseudocode to print numbers divisible by 5, for the integers from 1 to 99. 9. Draw a flowchart and write its pseudocode to read a positive integer, then calculate and print its factorial. 10. Draw a flowchart and write its pseudocode to calculate the following serial: 1+3+5+7+9+ ...+159 =? Lab 2: Problem Solving Concepts Diploma in Programming and Computer Science 1. Answer to the following questions: N Question 1 An algorithm is a set of instructions designed to perform a specific task. 2 The Sequence Flowchart is a binary decision block that provides two separated branches of processes. 3 To assign an initial value in pseudocode we use INITIALIZE or SET. 4 In pseudocode, the WHILE loop is a pre-test loop. 5 The logic-time errors occur when the programmer fails to obey one of the grammar rules of the language. 6 The Run-time errors occur whenever the program instructs the computer to do something that it is either incapable or unwilling to do. 2. Trace the following flowchart and tell what it will display. What is the last value of i? How many times the loop will be repeated? False STOP START i<10 >=0 True PRINTI ifi-1 T/F 3. Draw a flowchart and write its pseudocode to calculate the product of two numbers A and B entered by user. 4. Draw a flowchart and write its pseudocode to convert temperature from Celsius to Fahrenheit. F = (Cx 2) + 30 5. Draw a flowchart and write its pseudocode to determine if a given integer is even or odd. 6. Draw a flowchart and write its pseudocode to determine for a given number of month [1..12] is in which season {winter, spring, summer or autumn). 7. Draw a flowchart and write its pseudocode to read three integers, determine which has greater value and then print this value if it is even. 8. Draw a flowchart and write its pseudocode to print numbers divisible by 5, for the integers from 1 to 99. 9. Draw a flowchart and write its pseudocode to read a positive integer, then calculate and print its factorial. 10. Draw a flowchart and write its pseudocode to calculate the following serial: 1+3+5+7+9+ ...+159 =?
Expert Answer:
Answer rating: 100% (QA)
Solutions Step 1 Question 1 1 True 2 True 3 True 4 False 5 False 6 False Explanation Question 1 A co... View the full answer
Related Book For
Business Statistics A First Course
ISBN: 9780321979018
7th Edition
Authors: David M. Levine, Kathryn A. Szabat, David F. Stephan
Posted Date:
Students also viewed these programming questions
-
The roots of a quadratic function ax + bx + c = 0 can be calculated using the quadratic formula 1,2 -bb2-4ac 2a The discriminant of the formula, b2-4ac, indicates whether the roots are real or...
-
Write a function named "count the" in C which counts the number of times a given word "the" appears in the string parameter. Test Data: Input: The string where the word the present more than once....
-
Sportsman Marine Supply reported the comparative income statement for the years ended September 30, 2017, and 2016, shown below: During 2017, accountants for the company discovered that ending 2016...
-
If the price floor for corn is $3 per bushel and it is raised to $4 per bushel, what is the impact of that policy if the market price of corn is $6.50 per bushel?
-
Predict the correct one out of the following: (a) The boiling point of a refrigerant should be appreciably lower than the temperature levels at which the refrigerator works (b) The freezing point of...
-
In 2009, the New York Yankees won 103 baseball games during the regular season. The table on the next page lists the number of victories (W), the earnedrun average (ERA), and the batting average...
-
Tatum Company has four products in its inventory. Information about ending inventory is as follows: Total Net Realizable Value Total Replacement Product Total Cost 101 $ 129,000 Cost $ 118,100 $...
-
Use polygons and lines to create a graphics image that looks like a fireworks display. Write an application that extends JPanel and displays the fireworks. Save the file as JFireworksPanel.java.
-
A proton enters the uniform electric field produced by the two charged square plates shown below. The plates carry charges +Q and Q, where the magnitude Q = 0.2 C. The speed of the proton when it...
-
Terry and Maria Redlin have been married for eight years. Terry is an oil rig maintenance supervisor for Holyann Corporation and Maria works as a cashier for Mynards. Terry s birthdate is February 2...
-
A 4 . 0 nC charge is placed 2 . 0 cm from a fixed - 1 . 0 nC charge. If the 4 . 0 nC charge is moved to a point 6 cm from the - 1 . 0 nC charge, by what factor does the magnitude of the force on the...
-
WILL UPVOTE! Please answer the following questions 1. Differentiate closed-end and open-end investment companies 2. Determine a fund's net asset value 3. Contrast a closed-end investment company's...
-
x A projectile is launched at a horizontal distance R from the edge of a cliff of height h in such a way as to land a horizontal distance from the bottom of the cliff. Assume there is some limiting...
-
A standing wave is produced by a wave = (2.50 cm)cos [(3.34 cm )x - (2.33 st] moving to the right and a wave y = (2.50 cm)cos [(3.34 cm-)x+ (2.33 s-)] moving to the left. At what location on the...
-
Economic theories from ancient Greece to classical economics (Adam Smith), including the development of ancient Greece, ancient Rome, medieval Europe, mercantilism, classical political economy, and...
-
B made an issue of 150,000 $1 ordinary shares at a premium of 20% the proceeds of which is received by cheque. What is the correct journal to record this? A. Bank Share capital Share premium B. Bank...
-
The U. S. Department of Transportation maintains statistics for mishandled bags per 1,000 airline passengers. In October 2013, Delta mishandled 1.55 bags per 1,000 passengers. What is the probability...
-
The Pew Internet Project survey of 1,006 American adults found the following: 906 have a cell phone 584 have a smartphone 322 have an eBook reader 423 have a tablet computer Source: Device Ownership...
-
The more costly and time consuming it is to export and import, the more difficult it is for local companies to be competitive and to reach international markets. As part of an initial investigation...
-
What do you really enjoy doing? What is your passion? Can your passion be a platform for a viable opportunity?
-
What do your friends and family envision you doing? What strengths and weaknesses do they observe? How do their insights help lead you to an opportunity that is right for you?
-
Put several of your ideas through the opportunity checklist in Figure 3.10. Which ideas seem to have the highest potential? Customer Identifiable Demographics Psychographics Trends Macromarket Target...
Study smarter with the SolutionInn App