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

Quiz

Lecture 11 (funcitons)

Ержан Шынгаев 13 Fragen

Quiz starten

Dieses Quiz enthält Fragetypen, die sich im gewohnten Player öffnen.

Fragen in diesem Quiz (13)

  1. 1Functions are
    1. Anamed pieces of code that can be called multiple times in a program
    2. Bnamed pieces of code that can be called one time in a program
    3. Cnamed pieces of code that can be called multiple times in a while loop
  2. 2parameter
    1. ASetup to a function
    2. BOutput to a function
    3. CInput to a function
  3. 3We say a function [blank_start]returns[blank_end] a value if it produces [blank_start]output[blank_end]
    1. Areturns
    2. Boutput
  4. 4A function that produces output can be called a [blank_start]fruitful function[blank_end]
    1. Afruitful function
  5. 5[blank_start]print()[blank_end] – accepts parameters, but never returns a value
    [blank_start]input()[blank_end] – may accept a parameter, but always returns a value
    1. Aprint()
    2. Binput()
    3. Cwhile
    4. Dfor
    5. Edef
    6. Felse
    7. Gbreak
  6. 6Functions are similar to [blank_start]variables[blank_end] in that they must be defined [blank_start]before[blank_end] they are used
    1. Avariables
    2. Bbefore
  7. 7Generally it is best to place them at the [blank_start]beginning[blank_end] of the program so the interpreter reads them and has them in memory
    1. Abeginning
    2. Bend
    3. Cmiddle
  8. 8Functions follow the same naming rules as variables
    1. AMay contain upper and lower case letters, digits, and underscores
    2. BMust start with a letter or digit
    3. CConvention normally has words separated by underscores
    4. Dcan be used like ‘return’ or ‘return value
    5. Emust be defined before they are used
  9. 9Whenever the interpreter encounters a ‘return’ inside a function it does not leave the function immediately
    1. ARichtig
    2. BFalsch
  10. 10A ‘[blank_start]return[blank_end]’ may be followed by a value to give back to the caller
    1. Areturn

Informationen

Beschreibung
CS 0008
Sprache
English
Aufrufe
4
Schlagwörter
sltmidterm
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck