Preview

08 - Interpret Algorithms using flowcharts

 1. A flowchart is a diagram that represents a set of instructions. Flowcharts normally use _____________ to represent the different types of instructions

  selection blocks (e.g. IF statements)

  standard code blocks

  standard symbols

  code loops

 2. A flow chart is useful in the planning out of a program. An advantage is that:

  Useful in providing documentation so that new programmers can understand the code/purpose of program

  Useful in describing not just the inputs and logic but the flow of the program

  Visual representation of the logic of the program which is useful for some

  All of the above are valid advantages

 3. A flowchart is the _________ with the help of different symbols, shapes and arrows in order to demonstrate a process or a program.

  text based presentation and representation

  graphical or pictorial representation of an algorithm

  same as pseudocode and

  exact opposite of coding or programming

 4. INPUT / OUTPUT is usually represented using a:

  parallelogram

  Simple rectangle

  Circle /Oval

  Diamond

 5. A process or instruction is usually represented using a:

  parallelogram

  Circle /Oval

  Diamond

  Simple rectangle

 6. A decision is represented by the following symbol:

  Circle /Oval

  Diamond

  parallelogram

  Simple rectangle

 7. Can you interpret the flowchart in the image and fill in the blanks for step 4?
Step 1: Initialize X as 0,

Step 2: Increment X by 1,

Step 3: Print X,

Step 4: __________________________
flowchart-algorithm-1.png

  If X is greater than 20 then go back to step 2

  If X is less than 20 then go back to step 2.

  If X is less than 20, then END the program

  If X is greater than 20 then return to the beginning

 8. In the following flowchart, how many INPUT/OUTPUT symbols are used?
Step 1: Read temperature in Fahrenheit,

Step 2: Calculate temperature with formula C=5/9*(F-32),

Step 3: Print C,
flowchart-algorithm-2.png

  4

  3

  2

  1

 9. A flowchart is a________________ of an algorithm, an algorithm can be expressed and analyzed through a flowchart.

  textual representation

  pictorial representation

  graphical representation

  code based representation

 10. A general rule of flowcharting is that all boxes of the flowchart are connected with …..

  arrows and diamonds to show the decisions in each box

  arrows (not just lines) so as to show the direction of flow

  plain lines (to show the input)

  None of the above

 11. In the following algorithm, if the input is '44', what is the result?
flowchart-algorithm-3.png

  End Program

  "Above Freezing"

  "Below Freezing"

  None of the above

 12. What does the following flow chart do?
Flowchart-to-find-largest.png

  Finds the smallest number from the variables a, b and c entered

  Finds the largest number from three different numbers entered by the user

  Finds the first (alphabetically) from the entered letters a, b and c

  None of the above

 13. What flow chart symbol is executed if the email ID and password are NOT correct?
facebook_login_flowchart.png

  Log in error

  Go back to 'Start'

  Display Account

  End Program (Crash)

 14. Analyse the following flow chart and predict what it does.
printhelloworldflowchart.png

  Print "Hello World" 10 times

  None of the above

  The flow chart is set up wrong as the count starts at 0 - so nothing will be printed

  Prints "Hello World" just one time

 15. In the following algorithm, how many INPUT/OUTPUT boxes (parallelograms) would be in use?
Enter www.facebook.com in your browser.  
facebook Home page loads  
Enter your Email ID 
If Email ID field has been entered, then Enter Password    
Check to see if Email ID and Password are both valid entries
if NO then
Log in error  
go to step 3
else
Display facebook Account 
Stop

  1

  3

  4

  2

 16. In the following flow chart, if the numbers 1,2,3,4,5 are entered what is the output?
findthesumof5numbers_flowchart.png

  12

  10

  15

  5

 17. Indicates any type of internal operations like initialization, calculation etc.

  Connector

  Decision

  Terminal

  Process

 18. Used for asking questions that can have either TRUE or FALSE (YES or NO) as an answer.

  Decision

  Connector

  Terminal

  Process

 19. Indicates the starting or ending of the algorithm.

  Decision

  Connector

  Process

  Terminal