MABS Institution
11th Computer Science Weekly Test -1 ( Composition and Decomposition )-Aug 2020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Write the algorithm specification to find minimum of 2 numbers.
-
Draw a flowchart for -3case analysis using alternative statements.
-
Draw various symbols used in flowchart with their usage.
-
-
Define iteration.
-
What are the disadvantage of using flowchart?
-
-
Write a note on refinement.
-
Write an algorithm to test whether a triangle is right-angled are not.
-
Circulate the contents: Write the specification and construct an algorithm to circulate the contents of the variables A, B and C as shown below: The arrows indicate that B gets the value of A, C gets the value of B and A gets the value of C.
-
-
What is a functions? Explain in detail.
-
Explain case analysis in detail with an example.
-
-
Decanting problem. You are given three bottles of capacities 5 ,8 and 3 litres. The 8L bottle is filled with oil, while the other two are empty. Divide the oil in 8L bottle into two equal quantities. Represent the state of the process by appropriate variables. What are the initial and final states of the process? Model the decanting of oil from one bottle to another by assignment. Write a sequence of assignments to achieve the final state.