388 views
5 votes
You want to use pseudocode to plan a program. Finish the line of code to complete this part of your pseudocode.

1 Answer

0 votes

Answer:

Step-by-step explanation:

s developers and data scientists, we go through many stages, from getting an idea to reaching a valid, working implementation of it. We need to design and validate an algorithm, apply it to the problem at hand and then test it for various input datasets.

In the initial state of solving a problem, it helps to eliminate the limitations offered by a specific programming language’s syntax rules when we design or validate an algorithm. By doing this, we can focus our attention on the thought process behind the algorithm and how it will (or won’t) work instead of focusing on our syntax.

Here’s where pseudocode comes to the rescue.

WHAT IS PSEUDOCODE?

Pseudocode in data science or web development is a technique used to describe the distinct steps of an algorithm in a way that’s easy for anyone with basic programming knowledge to understand.

What Is Pseudocode?

We use pseudocode in various fields of programming, whether it be app development, data science or web development. Pseudocode is a technique used to describe the distinct steps of an algorithm in a manner that’s easy to understand for anyone with basic programming knowledge. Although pseudocode is a syntax-free description of an algorithm, it must provide a full description of the algorithm’s logic so that moving from pseudocode to implementation is merely a task of translating each line into code using the syntax of any given programming language.

CLARIFY YOUR CODE

5 Ways to Write More Pythonic Code

THE MAIN CONSTRUCTS OF PSEUDOCODE

At its core pseudocode is the ability to represent six programming constructs (always written in uppercase): SEQUENCE, CASE, WHILE, REPEAT-UNTIL, FOR, and IF-THEN-ELSE. These constructs — also called keywords —are used to describe the control flow of the algorithm.

SEQUENCE represents linear tasks sequentially performed one after the other.

WHILE a loop with a condition at its beginning.

REPEAT-UNTIL a loop with a condition at the bottom.

FOR another way of looping.

IF-THEN-ELSE a conditional statement changing the flow of the algorithm.

CASE the generalization form of IF-THEN-ELSE.

User Jerad
by
7.6k points