Game Preview

Programming B

  •  English    16     Public
    Students develop skills in using text programming environment
  •   Study   Slideshow
  • A student has written a program that calculates the area of a rectangle. However, the program has some errors. State the three errors in the program.
    ", int, *
  •  20
  • Can you predict what shape the code will draw?
    Rectangle
  •  10
  • Here is some code. Which of these describes what the code is saying?
    B
  •  5
  • Which of the following would be considered good advice for naming a variable?
    B
  •  10
  • Can you predict what shapes the code will draw?
    A. Square B. Triangle
  •  10
  • The program below asks the user about the weather and then offers some simple advice. State the name of the missing statement in line 4.
    else
  •  10
  • The Python program below has been written as part of an age confirmation check for an online game. Match each letter to the correct description.
    comment, user-defined variable, function
  •  25
  • There is an error in the code. Identity the line number of the error.
    Line 1
  •  5
  • State the name of the variable in Line 3.
    MathMark
  •  10
  • State the meaning of this operator: != ......................
    not equal to
  •  15
  • The operator, ==, represents greater than.
    False
  •  5
  • Variable names are case-sensitive (age, Age and AGE are three different variables).
    True
  •  25
  • A variable name can start with a number.
    False
  •  10
  • Rectangle shape is used to represent a process or calculation in a flowchart algorithm.
    True
  •  15
  • Please mention the data type of the line.
    List
  •  10
  • Match the algorithmic terms to the lines of code.
    Iteration, Sequence, Selection
  •  25