2.2

Cards (21)

  • Sequence
    Statements are executed one after another.
  • Selection
    The process of making a decision.
  • Iteration
    When a program needs to repeat certain steps until told otherwise, or until a condition has been met.
  • Integer
    Whole numbers
  • Float
    Decimal numbers
  • Character
    A single alphanumeric character
  • String
    One or more alphanumeric characters
  • Boolean
    True or False
  • Integers and floats cannot be concatenated.
  • Numbers held in strings cannot be subject to mathematical operations
  • Convert a string to uppercase
    .upper()
  • Convert a string to lowercase
    .lower()
  • Count how many times a character appears in a string
    .count()
  • Replace a character in a string
    .replace( , )
  • Length of a string
    len()
  • Open a file so that data can be read
    file = openRead()
  • Open a file so that data can be written
    file = openWrite()
  • Close a file
    file.close()
  • Save a line in a file to a variable
    x = myFile.readLine()
  • Write a line in a file

    file.writeLine()
  • Return characters 2-4 from a string
    print([2:5])