GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

Algorithms - What are they? , how do you write them?

Gelöschter Nutzer Der Nutzer hat seine Fachbereichs-Information gelöscht. Englisch 2 Seiten

Inhalt der Notizen (2)

Seite 1

What are algorithms?

Algorithms are representations of how to solve problems. These problems can be in code or in everyday life. For instance you could write an algorithm on how to brush your teeth. In fact you probably, without even knowing it, mentally write hundreds of algorithms every day.

How can algorithms be written?

Algorithms can be written as both flowcharts and pseudocode.

Flowcharts

Flowcharts are diagrammatic representations of steps taken to solve a problem. They use various shapes to represent different things.

The shapes are:

Rhombus = decision

Parallelogram = Output or input (information going out or in)

Rectangle = Process (somthing being done)

Rectangular circle = Start / stop

Lines with arrows indicate the direction of flow (in which order things are done).

This is an example of a flowchart

Algorithms - What are they? , how do you write them?

Seite 2

What is pseudocode?

Pseudocode is a written representation of an algorithm using various code like terms but remember pseudocode is not actual code. These are the pseudocode terms:

OUPUT: showing something on the screen or electronic device - usually requiring an input afterwards

INPUT: something that the user puts into the program

STORE: a process that stores data in the program

IF: represents a condition e.g if colour = red

THEN: Showing what to do if the condition is true

ELSE: showing what to do if the condition is false

Here is an example

OUPUT: "How are you?"

INPUT: User inputs how they are

STORE: Store users input in answer variable

IF: answer = fine THEN OUTPUT: "That's good"

ELSE

OUPUT: "You need to go to a doctor"

Algorithms - What are they? , how do you write them?

Informationen

Beschreibung
Der Nutzer hat seine Fachbereichs-Information gelöscht. Notiz am Algorithms - What are they? , how do you write them?, erstellt von Gelöschter Nutzer am 14/11/2016.
Erstellt von
Gelöschter Nutzer · Nov 2016
Aktualisiert
30 Dez 2016
Aufrufe
340
Verlauf
  • Erstellt von Oliver Faragher · 14 Nov 2016
  • Kopiert von Oliver Faragher · 14 Nov 2016
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck