Programming fundamentals

Cards (5)

  • File handling
    • Opens a file ready for processing
    • Closes a file
    • Reads one line of text at a time from an open file
    • Writes one line of text at a time to an open file
    • Loops through a text file line-by-line and prints out each line
  • Data types
    • Integer: Whole number
    • Real/float: Number that can have a fractional part
    • Character: A single letter, symbol or number
    • String: Multiple characters
    • Boolean: Has two values: true or false
  • Python code for reading one line of text at a time from an open file
  • Python code for writing one line of text at a time to an open file
  • Python code for looping through a text file line-by-line and printing out each line