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

  selection blocks (e.g. IF statements)

  code loops

  standard code blocks

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

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

  All of the above are valid advantages

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

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

 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

  same as pseudocode and

  graphical or pictorial representation of an algorithm

  exact opposite of coding or programming

 4. INPUT / OUTPUT is usually represented using a:

  Simple rectangle

  Diamond

  Circle /Oval

  parallelogram

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

  Diamond

  parallelogram

  Simple rectangle

  Circle /Oval

 6. A decision is represented by the following symbol:

  Diamond

  parallelogram

  Simple rectangle

  Circle /Oval

 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 greater than 20 then return to the beginning

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

  If X is less 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

  3

  4

  1

  2

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

  textual representation

  pictorial representation

  code based representation

  graphical representation

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

  plain lines (to show the input)

  arrows and diamonds to show the decisions in each box

  None of the above

  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

  End Program

  None of the above

  "Above Freezing"

  "Below Freezing"

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

  None of the above

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

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

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

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

  Display Account

  End Program (Crash)

  Go back to 'Start'

  Log in error

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

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

  Print "Hello World" 10 times

  Prints "Hello World" just one time

  None of the above

 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

  4

  1

  2

  3

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

  12

  15

  5

  10

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

  Terminal

  Decision

  Connector

  Process

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

  Process

  Terminal

  Decision

  Connector

 19. Indicates the starting or ending of the algorithm.

  Terminal

  Connector

  Process

  Decision