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

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

  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.

  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:

  Circle /Oval

  Diamond

  Simple rectangle

  parallelogram

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

  Simple rectangle

  Diamond

  Circle /Oval

  parallelogram

 6. A decision is represented by the following symbol:

  parallelogram

  Circle /Oval

  Simple rectangle

  Diamond

 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 go back to step 2.

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

  If X is greater than 20 then return to the beginning

  If X is less than 20, then END the program

 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.

  textual representation

  code based representation

  pictorial 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)

  None of the above

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

  arrows and diamonds to show the decisions in each box

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

  "Below Freezing"

  None of the above

  "Above Freezing"

  End Program

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

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

  None of the above

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

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

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

  Display Account

  Log in error

  End Program (Crash)

  Go back to 'Start'

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

  Prints "Hello World" just one time

  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

 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

  1

  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

  5

  10

  12

  15

 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

  Terminal

  Process

  Connector

 19. Indicates the starting or ending of the algorithm.

  Terminal

  Connector

  Decision

  Process