FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Jackson has written a section of code in his program that instructs a character to move forward unless it encounters an obstacle, such as a rock. If the character encounters an obstacle, then it should change direction before moving forward again. If it does not encounter an obstacle, it should continue moving forward. Which type of control structure has Jackson written?
A
Functional
B
Sequence
C
Loop
D
Selection
Explanation: 

Detailed explanation-1: -The basic Control Structures in programming languages are: Conditionals (or Selection): which are used to execute one or more statements if a condition is met. Loops (or Iteration): which purpose is to repeat a statement a certain number of times or while a condition is fulfilled.

Detailed explanation-2: -In selection control structures, conditional statements are features of a programming language which perform different computations or actions depending on whether a programmer-specified Boolean condition evaluates to true or false.

Detailed explanation-3: -She explains that every step must be followed in order and that no steps may be skipped. She shows the errors that will occur if the order is mixed or steps are skipped. This type of programming structure is known as: sequence.

There is 1 question to complete.