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

Folien

Pseudo code guide

Oscar Smith Computer Science Year 10 Englisch 5 Folien

Folien in diesem Satz (5)

  1. Inputs and Outputs

    • If the user has to input something you write INPUT and then the variable
    • If the program has to output something then you write OUTPUT followed by what you are outputting in speech marks.
  2. Selection

    • For IF statements
    • You write IF followed by the desired condition and then a THEN (instead of a colon). You can then write what happens next, making sure that it is on the line below and indented.
    • You can use ELIF for any following conditions.
    • Next you write ELSE followed by what happens next, making sure that it is on the next line and indented.
    • Finish the IF statement by writing ENDIF at the bottom of the statement.
  3. Iteration

    • For iteration:
    • For a loop, you simply write REPEAT at the top of the code you want to repeat and then at the bottom of this code you write UNTIL followed by the condition.
    • Make sure that the code you are looping is indented.
  4. Example

    • REPEAT
    • OUTPUT "Please enter a parcel number"
    • INPUT parcel number
    • IF parcel number has eight characters THEN
    • OUTPUT "valid parcel number"
    • ELSE
    • OUTPUT "Invalid parcel number"
    • ENDIF
    • UNTIL parcel number has eight characters
  5. Functions

    • It is similar to python. At the top of your function write FUNCTION (then your function name).
    • To jump to this function you just write the function name followed by ().

Informationen

Beschreibung
Year 10 Computer Science Folienset am Pseudo code guide, erstellt von Oscar Smith am 20/09/2018.
Erstellt von
Oscar Smith · Sep 2018
Aktualisiert
27 Sep 2018
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck