close
test_template

Sequence, Selection and Iteration in Programming Language

About this sample

About this sample

close

Words: 690 |

Pages: 2|

4 min read

Published: Mar 19, 2020

Words: 690|Pages: 2|4 min read

Published: Mar 19, 2020

Output statements are instructions that a computer will read and process from a portion of a program. The program will send the information to an output statement which usually will look like this: print(“Hello, World”). This type of statement will display this sentence on the screen. Output statements are also very useful to display calculations (print(2+2), which would then calculate and present the number 4. This type of statement can show stings, integers and calculations. Output statements are needed as is able to display different question that might be needed to be known of.

Variables (known as memory location) are used to collect information that can be changed and stored to look at later in the program. These values can change when a user is asked a question, for example, when asking for their name. It will store there name and change during the programs executions. It may use it later on in the program. Different variables are given appropriate names so they are easily understandable. Many programmer make variables follow strict naming convention. It should begin with a letter, lowercased, however upper cased is allows and must no contain any spaces.

Input statemens are most commonly used to register a response from a user. These statements allow this variable to be input and stored as data. In python, for example, all inputs statements are held in the String data type. Therefore it means that they will be detected as characters (alphanumerical), which means letters, numbers and symbols. u This code sample explains that the piece of code has been ordered to ask a question to the user to enter their name, it will then be stored and used for later purposes.

In a sequence structure, an action or event that is program driven will begin with the ordered and follow it up with another order in a predetermined order. This structure allows any numbers of actions/ events to take place, however, these cannot be skipped and run in the logical order given to sequence. It will not have the ability to branch off into other parts of the coding and will only follow the strictly given instructions. Most commonly this structure is used in procedural programming.

Sequences are necessary structures to contain when coding as it makes sure the tasks that have been given, is proceeding in the correct order as, without this, the sequences would be at a fault and will become unorganised possibly confusing the user, if the user has been given a question.

The selection structure can be used when a question is asked. It will then determine the route in which the program will take, this will cause the program to move on to the next events, asking different questions. They’re also important when decision making needs to be made. Selections methods are usually: IF, Then, Else or Else IF statements.

Selections is essential as it allows programs to have different paths made by choice making. Without this branched question wouldn’t be a thing, and the solutions that would be created wouldn’t be realistic.

Iterations is a programming structure that causes a process of events to be repeated in an order that is specified by the number of times it happens or until the cooldown is met. This is also known as a loop when a set of instructions has been executed in a repeated manner.

Iteration is crucial as it allows algorithms to be simplified by mentioning that specific procedures will only repeat until told otherwise. However, this code sample shows that it is the same code repeated a lot of times. It works, but it’s a waste of time and effort.

Get a custom paper now from our expert writers.

But when using iteration programming structure it displays the names that have been stored in the variable, it makes a loop and invites them personal saving time. The concept of while loops: It will repeat itself depending on the instructions that are based on a condition. It must finish with a Boolean value of TRUE. This type of loop is used when the programmer doesn’t know the exact number of time the code is needed to be repeated.

Image of Alex Wood
This essay was reviewed by
Alex Wood

Cite this Essay

Sequence, Selection and Iteration in Programming Language. (2020, March 16). GradesFixer. Retrieved October 11, 2024, from https://gradesfixer.com/free-essay-examples/sequence-selection-and-iteration-in-programming-language/
“Sequence, Selection and Iteration in Programming Language.” GradesFixer, 16 Mar. 2020, gradesfixer.com/free-essay-examples/sequence-selection-and-iteration-in-programming-language/
Sequence, Selection and Iteration in Programming Language. [online]. Available at: <https://gradesfixer.com/free-essay-examples/sequence-selection-and-iteration-in-programming-language/> [Accessed 11 Oct. 2024].
Sequence, Selection and Iteration in Programming Language [Internet]. GradesFixer. 2020 Mar 16 [cited 2024 Oct 11]. Available from: https://gradesfixer.com/free-essay-examples/sequence-selection-and-iteration-in-programming-language/
copy
Keep in mind: This sample was shared by another student.
  • 450+ experts on 30 subjects ready to help
  • Custom essay delivered in as few as 3 hours
Write my essay

Still can’t find what you need?

Browse our vast selection of original essay samples, each expertly formatted and styled

close

Where do you want us to send this sample?

    By clicking “Continue”, you agree to our terms of service and privacy policy.

    close

    Be careful. This essay is not unique

    This essay was donated by a student and is likely to have been used and submitted before

    Download this Sample

    Free samples may contain mistakes and not unique parts

    close

    Sorry, we could not paraphrase this essay. Our professional writers can rewrite it and get you a unique paper.

    close

    Thanks!

    Please check your inbox.

    We can write you a custom essay that will follow your exact instructions and meet the deadlines. Let's fix your grades together!

    clock-banner-side

    Get Your
    Personalized Essay in 3 Hours or Less!

    exit-popup-close
    We can help you get a better grade and deliver your task on time!
    • Instructions Followed To The Letter
    • Deadlines Met At Every Stage
    • Unique And Plagiarism Free
    Order your paper now