Programming Building Blocks

INTRODUCTION TO PROBLEM SOLVING An algorithm is a sequence of simple steps that can be followed to solve a problem. These steps must be organized in a logical, and clear manner. We design algorithms using three basic methods of control: sequence, selection, and repetition. 1.1 Sequential control. Sequential Control means that the steps of an algorithm are carried out in a sequential manner where each step is executed exactly once. Let’s look at the following problem: We need to obtain the temperature expressed in Farenheit degrees and convert it to degrees Celcius. An algorithm to solve this problem would be: 1. Read temperature in Farenheit 2. Apply conversion formula 3. Display result in degrees Celcius In this example, the algorithm consists of three steps. Also, note that the description of the algorithm is done using a so-called pseudocode. A pseudocode is a mixture of English (or any other human language), symbols, and selected features commonly used in programming languages. Here is the above algorithm written in pseudocode:

Overall Rating

0

5 Star
(0)
4 Star
(0)
3 Star
(0)
2 Star
(0)
1 Star
(0)
APA

Frontiers, E. (2023). Programming Building Blocks. Afribary. Retrieved from https://tracking.afribary.com/works/programming-building-blocks

MLA 8th

Frontiers, Edu "Programming Building Blocks" Afribary. Afribary, 23 Feb. 2023, https://tracking.afribary.com/works/programming-building-blocks. Accessed 22 Dec. 2024.

MLA7

Frontiers, Edu . "Programming Building Blocks". Afribary, Afribary, 23 Feb. 2023. Web. 22 Dec. 2024. < https://tracking.afribary.com/works/programming-building-blocks >.

Chicago

Frontiers, Edu . "Programming Building Blocks" Afribary (2023). Accessed December 22, 2024. https://tracking.afribary.com/works/programming-building-blocks