Study

Algorithm & Programming

  •   0%
  •  0     0     0

  • What is the purpose of an if statement?
    Decision making
  • What symbol is used in python to assign values to a variable?
    equals =
  • When does a while loop stop running?
    When the condition is false
  • Which data type is used to store: "D"
    String
  • Which data type is used to store: TRUE
    Boolean
  • What will this code output?
    1,2,3,4,5,6,7,8,9
  • This data type is used to store whole numbers
    Integer
  • What is the word (command) used to display numbers and text on the screen?
    Print
  • Which keyword is used to repeat code while a condition is true?
    While Statement
  • Which loop is best when the number of repetitions is known in advance?
    For statement
  • Which Data Type would the following be stored as:--- " Biscuit "
    String
  • Which loop is more suitable for processing each item in a list?
    For Statement
  • The number or word we give to a variable
    Value
  • Which of these would work as a piece of code?
    if answer=="Yes" :
  • Which data type is used to store: 100
    Integer
  • What does break do in a loop?
    stop the execution
  • When is break most appropriately used?
    Condition is MET
  • Which control structure is best to check multiple conditions?
    if–elif–else
  • Which of the following is an integer?
    2
  • A price such as £3.65 should be saved as which data type?
    Float