SlideShare a Scribd company logo
1 of 14
Algorithms Sheet 2
Identifying Control Structures
1. Match the terms sequence, binary
     selection, multiway selection and
 iteration to the descriptions that follow:

(a) a decision taken in an algorithm which can
    go either of two ways
            binary selection

(b) decision taken in an algorithm which allows
    decision
   more than two choices
     more than two
            multiway selection
1. Match the terms sequence, binary
     selection, multiway selection and
 iteration to the descriptions that follow:
       decision
(a) a decision taken in the processing done by an ATM
    to either withdraw, deposit or check account balance,
    depending on the key pressed           more than two
              multiway selection

(d) a loop in a process which repeats the same
                               repeats
    instructions a number of times
              iteration
1. Match the terms sequence, binary
     selection, multiway selection and
 iteration to the descriptions that follow:

                                 always
(e) a part of a program where we always add 1 to
    a counter and then print
            sequence

(f) a portion of a program that is done over and
                                        over and
    over again and only stops when the count
    over again,
    reaches zero
            iteration
2. Identify two of the control structures
  used in each of the following algorithms

(a)
Count = 0              sequence
REPEAT                 iteration/repetition
      DoTheLoop
      Add 1 to Count   sequence
UNTIL Count = 5
2. Identify two of the control structures
  used in each of the following algorithms

(b)
WHILE Count <= 5         iteration/repetition
    Add 1 to Count       sequence
    DoTheLoop
END WHILE
2. Identify two of the control structures
     used in each of the following algorithms

(c)
Get NextVideo                             sequence
IF category = ‘X’                         selection (binary)
    THEN print ‘You cannot watch this!’
    ELSE DoBorrowProcess
         Print details
END IF
2. Identify two of the control structures
     used in each of the following algorithms

(d)
REPEAT                              iteration/repetition
   Enter Number                     sequence
   IF Number > highest              selection
       THEN set highest to Number
   END IF
UNTIL no more Numbers
2. Identify two of the control structures
     used in each of the following algorithms

(e)
WHILE more input                   iteration/repetition
    Select input                   selection (multiway)
          CASE 1
                   DoWithdrawals
        CASE 2
                   DoDeposits
        CASE 3
                DoAccountBalance
        CASE other
                DoErrorProcess
  END select
  Get input                        sequence
END WHILE
3.
  Identify the
control structure
  other than
   sequence
  used in the
   following
  algorithms:
3.
  Identify the
control structure
  other than
   sequence
  used in the
   following
  algorithms:
3.
  Identify the
control structure
  other than
   sequence
  used in the
   following
  algorithms:
3.
  Identify the
control structure
  other than
   sequence
  used in the
   following
  algorithms:
Remember
You need to know how to apply
this information, so see me for
 further help if you think it is
       necessary for you.

More Related Content

What's hot

Conditional and control statement
Conditional and control statementConditional and control statement
Conditional and control statementnarmadhakin
 
Python iteration
Python iterationPython iteration
Python iterationdietbuddha
 
Notes on assignment in r
Notes on assignment in rNotes on assignment in r
Notes on assignment in rTJ Mahr
 
Control Structures in Python
Control Structures in PythonControl Structures in Python
Control Structures in PythonSumit Satam
 
Control structure C++
Control structure C++Control structure C++
Control structure C++Anil Kumar
 
Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxsandeep54552
 
Control statements anil
Control statements anilControl statements anil
Control statements anilAnil Dutt
 
computer notes - Data Structures - 17
computer notes - Data Structures - 17computer notes - Data Structures - 17
computer notes - Data Structures - 17ecomputernotes
 

What's hot (13)

Conditional and control statement
Conditional and control statementConditional and control statement
Conditional and control statement
 
Python iteration
Python iterationPython iteration
Python iteration
 
Notes on assignment in r
Notes on assignment in rNotes on assignment in r
Notes on assignment in r
 
Control Structures in Python
Control Structures in PythonControl Structures in Python
Control Structures in Python
 
Control structure C++
Control structure C++Control structure C++
Control structure C++
 
Control statements
Control statementsControl statements
Control statements
 
T
TT
T
 
Loops in Python
Loops in PythonLoops in Python
Loops in Python
 
Stacks
StacksStacks
Stacks
 
Python programming : Control statements
Python programming : Control statementsPython programming : Control statements
Python programming : Control statements
 
Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptx
 
Control statements anil
Control statements anilControl statements anil
Control statements anil
 
computer notes - Data Structures - 17
computer notes - Data Structures - 17computer notes - Data Structures - 17
computer notes - Data Structures - 17
 

Viewers also liked

Training presentation outlook 2007 manage your mailbox 3-move or copy message...
Training presentation outlook 2007 manage your mailbox 3-move or copy message...Training presentation outlook 2007 manage your mailbox 3-move or copy message...
Training presentation outlook 2007 manage your mailbox 3-move or copy message...Liam Dunphy
 
Programming Languages
Programming LanguagesProgramming Languages
Programming LanguagesLiam Dunphy
 
Break and continue statement in C
Break and continue statement in CBreak and continue statement in C
Break and continue statement in CInnovative
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareGagan Deep
 
Organising and dss steps in designing a spreadsheet solution
Organising and dss   steps in designing a spreadsheet solutionOrganising and dss   steps in designing a spreadsheet solution
Organising and dss steps in designing a spreadsheet solutionLiam Dunphy
 
Butterfly Struggles - An inspirational life lesson
Butterfly Struggles - An inspirational life lessonButterfly Struggles - An inspirational life lesson
Butterfly Struggles - An inspirational life lessonLiam Dunphy
 
Loops Basics
Loops BasicsLoops Basics
Loops BasicsMushiii
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchartlotlot
 
Flowchart pseudocode-examples
Flowchart pseudocode-examplesFlowchart pseudocode-examples
Flowchart pseudocode-examplesGautam Roy
 
Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowchartsnicky_walters
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1luhkahreth
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchartJordan Delacruz
 
Industrial process control
Industrial process controlIndustrial process control
Industrial process controlMohamed A Hakim
 

Viewers also liked (19)

Training presentation outlook 2007 manage your mailbox 3-move or copy message...
Training presentation outlook 2007 manage your mailbox 3-move or copy message...Training presentation outlook 2007 manage your mailbox 3-move or copy message...
Training presentation outlook 2007 manage your mailbox 3-move or copy message...
 
Mm expertise
Mm expertiseMm expertise
Mm expertise
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
Break and continue statement in C
Break and continue statement in CBreak and continue statement in C
Break and continue statement in C
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshare
 
Organising and dss steps in designing a spreadsheet solution
Organising and dss   steps in designing a spreadsheet solutionOrganising and dss   steps in designing a spreadsheet solution
Organising and dss steps in designing a spreadsheet solution
 
Meta Languages
Meta LanguagesMeta Languages
Meta Languages
 
Iteration
IterationIteration
Iteration
 
Butterfly Struggles - An inspirational life lesson
Butterfly Struggles - An inspirational life lessonButterfly Struggles - An inspirational life lesson
Butterfly Struggles - An inspirational life lesson
 
Loops Basics
Loops BasicsLoops Basics
Loops Basics
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
Loops in C
Loops in CLoops in C
Loops in C
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Flowchart pseudocode-examples
Flowchart pseudocode-examplesFlowchart pseudocode-examples
Flowchart pseudocode-examples
 
Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowcharts
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
 
Industrial process control
Industrial process controlIndustrial process control
Industrial process control
 

Similar to Algorithms2

theory of programming languages by shikra
theory of programming languages by shikratheory of programming languages by shikra
theory of programming languages by shikrajateno3396
 
Flow of control c++
Flow of control c++Flow of control c++
Flow of control c++Arpit Meena
 
Cisco labs practical1
Cisco labs practical1Cisco labs practical1
Cisco labs practical1Tai Lam
 
control statements of clangauge (ii unit)
control statements of clangauge (ii unit)control statements of clangauge (ii unit)
control statements of clangauge (ii unit)Prashant Sharma
 
Flow control in computer
Flow control in computerFlow control in computer
Flow control in computerrud_d_rcks
 
Object oriented programming system with C++
Object oriented programming system with C++Object oriented programming system with C++
Object oriented programming system with C++msharshitha03s
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming languageVasavi College of Engg
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeansHuu Bang Le Phan
 
C prograaming basic
C prograaming basicC prograaming basic
C prograaming basicDiameter_pb
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine LearningStudent
 
detail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfdetail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfssuserf86fba
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Algorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTSAlgorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTS
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTSAlicia Edwards
 

Similar to Algorithms2 (20)

PM1
PM1PM1
PM1
 
theory of programming languages by shikra
theory of programming languages by shikratheory of programming languages by shikra
theory of programming languages by shikra
 
Flow of control c++
Flow of control c++Flow of control c++
Flow of control c++
 
Cisco labs practical1
Cisco labs practical1Cisco labs practical1
Cisco labs practical1
 
control statements of clangauge (ii unit)
control statements of clangauge (ii unit)control statements of clangauge (ii unit)
control statements of clangauge (ii unit)
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
Flow control in computer
Flow control in computerFlow control in computer
Flow control in computer
 
Object oriented programming system with C++
Object oriented programming system with C++Object oriented programming system with C++
Object oriented programming system with C++
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming language
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
 
Tutorial PM.pptx
Tutorial PM.pptxTutorial PM.pptx
Tutorial PM.pptx
 
C++ chapter 4
C++ chapter 4C++ chapter 4
C++ chapter 4
 
C prograaming basic
C prograaming basicC prograaming basic
C prograaming basic
 
C++ rajan
C++ rajanC++ rajan
C++ rajan
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
 
detail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfdetail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdf
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Algorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTSAlgorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTS
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
 
Algorithm manual
Algorithm manualAlgorithm manual
Algorithm manual
 
Cgc2
Cgc2Cgc2
Cgc2
 
Intake 38 2
Intake 38 2Intake 38 2
Intake 38 2
 

More from Liam Dunphy

Tm hills scarytasla-ming
Tm hills scarytasla-mingTm hills scarytasla-ming
Tm hills scarytasla-mingLiam Dunphy
 
Creative learning spaces
Creative learning spacesCreative learning spaces
Creative learning spacesLiam Dunphy
 
#ccGlobal for cesimeet
#ccGlobal for cesimeet#ccGlobal for cesimeet
#ccGlobal for cesimeetLiam Dunphy
 
Tm sydney north - collaboration
Tm sydney north - collaborationTm sydney north - collaboration
Tm sydney north - collaborationLiam Dunphy
 
Training presentation outlook 2007 manage your mailbox 2-understand your choi...
Training presentation outlook 2007 manage your mailbox 2-understand your choi...Training presentation outlook 2007 manage your mailbox 2-understand your choi...
Training presentation outlook 2007 manage your mailbox 2-understand your choi...Liam Dunphy
 
Representational Tools
Representational ToolsRepresentational Tools
Representational ToolsLiam Dunphy
 
System Data Modelling Tools
System Data Modelling ToolsSystem Data Modelling Tools
System Data Modelling ToolsLiam Dunphy
 
Communications Systems
Communications SystemsCommunications Systems
Communications SystemsLiam Dunphy
 
Ipt Syllabus Changes Communications Systems
Ipt Syllabus Changes   Communications SystemsIpt Syllabus Changes   Communications Systems
Ipt Syllabus Changes Communications SystemsLiam Dunphy
 
Ipt Syllabus Changes
Ipt Syllabus ChangesIpt Syllabus Changes
Ipt Syllabus ChangesLiam Dunphy
 
Ipt Syllabus Changes Project Management
Ipt Syllabus Changes   Project ManagementIpt Syllabus Changes   Project Management
Ipt Syllabus Changes Project ManagementLiam Dunphy
 

More from Liam Dunphy (11)

Tm hills scarytasla-ming
Tm hills scarytasla-mingTm hills scarytasla-ming
Tm hills scarytasla-ming
 
Creative learning spaces
Creative learning spacesCreative learning spaces
Creative learning spaces
 
#ccGlobal for cesimeet
#ccGlobal for cesimeet#ccGlobal for cesimeet
#ccGlobal for cesimeet
 
Tm sydney north - collaboration
Tm sydney north - collaborationTm sydney north - collaboration
Tm sydney north - collaboration
 
Training presentation outlook 2007 manage your mailbox 2-understand your choi...
Training presentation outlook 2007 manage your mailbox 2-understand your choi...Training presentation outlook 2007 manage your mailbox 2-understand your choi...
Training presentation outlook 2007 manage your mailbox 2-understand your choi...
 
Representational Tools
Representational ToolsRepresentational Tools
Representational Tools
 
System Data Modelling Tools
System Data Modelling ToolsSystem Data Modelling Tools
System Data Modelling Tools
 
Communications Systems
Communications SystemsCommunications Systems
Communications Systems
 
Ipt Syllabus Changes Communications Systems
Ipt Syllabus Changes   Communications SystemsIpt Syllabus Changes   Communications Systems
Ipt Syllabus Changes Communications Systems
 
Ipt Syllabus Changes
Ipt Syllabus ChangesIpt Syllabus Changes
Ipt Syllabus Changes
 
Ipt Syllabus Changes Project Management
Ipt Syllabus Changes   Project ManagementIpt Syllabus Changes   Project Management
Ipt Syllabus Changes Project Management
 

Recently uploaded

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 

Recently uploaded (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

Algorithms2

  • 1. Algorithms Sheet 2 Identifying Control Structures
  • 2. 1. Match the terms sequence, binary selection, multiway selection and iteration to the descriptions that follow: (a) a decision taken in an algorithm which can go either of two ways binary selection (b) decision taken in an algorithm which allows decision more than two choices more than two multiway selection
  • 3. 1. Match the terms sequence, binary selection, multiway selection and iteration to the descriptions that follow: decision (a) a decision taken in the processing done by an ATM to either withdraw, deposit or check account balance, depending on the key pressed more than two multiway selection (d) a loop in a process which repeats the same repeats instructions a number of times iteration
  • 4. 1. Match the terms sequence, binary selection, multiway selection and iteration to the descriptions that follow: always (e) a part of a program where we always add 1 to a counter and then print sequence (f) a portion of a program that is done over and over and over again and only stops when the count over again, reaches zero iteration
  • 5. 2. Identify two of the control structures used in each of the following algorithms (a) Count = 0 sequence REPEAT iteration/repetition DoTheLoop Add 1 to Count sequence UNTIL Count = 5
  • 6. 2. Identify two of the control structures used in each of the following algorithms (b) WHILE Count <= 5 iteration/repetition Add 1 to Count sequence DoTheLoop END WHILE
  • 7. 2. Identify two of the control structures used in each of the following algorithms (c) Get NextVideo sequence IF category = ‘X’ selection (binary) THEN print ‘You cannot watch this!’ ELSE DoBorrowProcess Print details END IF
  • 8. 2. Identify two of the control structures used in each of the following algorithms (d) REPEAT iteration/repetition Enter Number sequence IF Number > highest selection THEN set highest to Number END IF UNTIL no more Numbers
  • 9. 2. Identify two of the control structures used in each of the following algorithms (e) WHILE more input iteration/repetition Select input selection (multiway) CASE 1 DoWithdrawals CASE 2 DoDeposits CASE 3 DoAccountBalance CASE other DoErrorProcess END select Get input sequence END WHILE
  • 10. 3. Identify the control structure other than sequence used in the following algorithms:
  • 11. 3. Identify the control structure other than sequence used in the following algorithms:
  • 12. 3. Identify the control structure other than sequence used in the following algorithms:
  • 13. 3. Identify the control structure other than sequence used in the following algorithms:
  • 14. Remember You need to know how to apply this information, so see me for further help if you think it is necessary for you.