Computer Science GCSE

Subdecks (2)

Cards (172)

  • What are logical operators sometimes called?
    Boolean operators
  • What is the purpose of logical operators?
    To make decisions in groups
  • What does the 'and' operator require to return true?
    Both sides must be true
  • What does the 'or' operator require to return true?
    One side must be true
  • What does the 'not' operator do?
    Inverts the result
  • How are logical operators used in programming?
    • Used with selection (if...elif...else)
    • Used with repetition (while)
    • Control program execution based on tests
  • What does the example program demonstrate about logical operators?
    It shows output, not a solution
  • What must be true for both sides of the 'and' operator?
    Both sides must be true
  • What happens if both sides of the 'or' operator are false?
    It returns false
  • How does 'not' affect a true test?
    It becomes false
  • What is a subprogram?
    A self-contained sequence of instructions
  • What is a function in programming?
    A subprogram that returns a value
  • What is a procedure in programming?
    A subprogram that does not return a value
  • What are parameters in a subprogram?
    Placeholders in the subprogram's definition
  • What are arguments in a subprogram?
    Values passed to a subprogram
  • What are built-in subprograms in Python?
    • Provided in Python
    • Perform commonly used tasks
    • Include data type conversion and input
  • What are library subprograms?
    • Grouped together in libraries
    • Require importing into programs
    • Examples include 'random', 'math', 'turtle'
  • What is the purpose of the 'random' library?
    To generate random numbers
  • What does the program example require you to do with random numbers?
    Generate and manipulate random real numbers
  • What is the purpose of a function in programming?
    To perform specific tasks and return values
  • What is good practice when naming parameters?
    Start with 'p' to avoid confusion
  • How can functions be called?
    From the main program or other subprograms
  • What must a program do to calculate the area of a rectangle?
    Accept length and width from the user
  • What does a procedure do in programming?
    Performs a task without returning a value
  • How can procedures be called?
    From the main program or other subprograms
  • What is the purpose of the turtle graphics procedure?
    To draw shapes on the screen
  • What is the difference between local and global variables?
    Local variables are accessible only in their subprogram
  • What does local scope describe?
    Only a single subprogram
  • What does global scope describe?
    The entire executing program
  • How does variable accessibility work in programming?
    Local scope is checked before global scope
  • What is the purpose of decomposition in programming?
    To break down problems into smaller parts
  • How do subprograms help in programming?
    They simplify design and debugging
  • What is an algorithm?
    A step-by-step procedure for solving a problem
  • What is the purpose of a flowchart in programming?
    To visually represent an algorithm
  • What does a selection algorithm do?
    Determines which path to take based on conditions
  • What does a repetition algorithm do?
    Repeats actions based on conditions
  • What is an array in programming?
    A collection of items stored at contiguous memory locations
  • What is the purpose of a loop in programming?
    To execute a block of code multiple times
  • What is the significance of variable names in programming?
    They indicate what the variable holds
  • What is the purpose of using meaningful variable names?
    To improve code readability and maintainability