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

  standard symbols

  code loops

  standard code blocks

  selection blocks (e.g. IF statements)

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

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

  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

  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.

  graphical or pictorial representation of an algorithm

  exact opposite of coding or programming

  text based presentation and representation

  same as pseudocode and

 4. INPUT / OUTPUT is usually represented using a:

  parallelogram

  Circle /Oval

  Simple rectangle

  Diamond

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

  parallelogram

  Circle /Oval

  Simple rectangle

  Diamond

 6. A decision is represented by the following symbol:

  Diamond

  Circle /Oval

  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 less than 20, then END the program

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

  If X is greater than 20 then return to the beginning

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

 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

  2

  1

  4

  3

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

  pictorial representation

  code based representation

  textual representation

  graphical 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

  None of the above

  plain lines (to show the input)

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

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

  None of the above

  "Above Freezing"

  "Below Freezing"

  End Program

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

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

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

  None of the above

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

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

  End Program (Crash)

  Go back to 'Start'

  Log in error

  Display Account

 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

  3

  2

  1

  4

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

  5

  12

  10

  15

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

  Process

  Decision

  Terminal

  Connector

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

  Terminal

  Decision

  Process

  Connector

 19. Indicates the starting or ending of the algorithm.

  Process

  Decision

  Connector

  Terminal