Python3 code bank for KS4, core reference for NEA

Quick reference guide with adaptable code snippets.

Covers…

  • File handling
  • Iterating over dictionaries
  • Iterating through numbers
  • Input
  • Print (and formatting technique)
  • Generic game loop
  • Generic login
  • Random shuffling
  • Random number generation
  • Removing items from a list
  • Adding items to a list
  • Modulus arithmetic operator
  • Thinking about using primitives or lists
  • Dictionaries
  • Len function
  • String methods – lower(), title()
  • Sorting a list of dictionaries
  • Casting integers to strings
  • Generic menu code – showing use of functions

$5.30

Save for later
  • python3-code-bank.pdf

About this resource

Info

Created: Sep 11, 2018

Updated: Sep 16, 2018

Worksheet

pdf, 143 KB

python3-code-bank

Report a problem