GoConqr has a new look! Let us know what you think.

Flashcards

Fundamentals of programming

Noah Barker Computing A level English 10 cards

Cards in this deck (10)

  1. 1What is a syntax error?Are typographical mistakes. The error will occur during the process of translating the code into a form the operator understands.
  2. 2What are some common examples?Forgotten bracket
    Forgotten colon
    Forgotten speech mark
    Misspelled function name
  3. 3What is a runtime error?They occur during the runtime of the program. A common cause of a runtime error is trying to allocate or retrieve a value from memory that doesn't exist.
  4. 4What are some common examples?When a number is divided by 0.
    Opening a file for reading that doesn’t exist
  5. 5What is a logical error?They occur when the program runs without any problems however it performs it in an unexpected way. For instance the output might be a different result to one we expect.
  6. 6What is a stack frame?The call stack is a dynamic data structure stored in RAM. Controls how functions call each other and how functions pass parameters to each other.
  7. 7What happens each time a call is made?Each time a call is made to a function the following details are added to the stack frame:
    Return address
    Parameters
    Local Variables
  8. 8What is recursion?Is a way of programming or coding a problem, in which a function calls itself one or more times in its body.
    Usually, it is returning the return value of this function call.
    If a function definition fulfils the condition of recursion, we call this function a recursive function.
    A subroutine is recursive if it is defined in terms of itself.
    The process of executing the subroutine is called recursion.
  9. 9What is a termination condition?A recursive function has to terminate to be used in a program.
    A recursive function terminates, if with every recursive call the solution of the program is downsized and moves towards a base case.
    A base case is a case, where the problem can be solved without further recursion. A recursion can lead to an infinite loop, if the base case is not met in the calls.
  10. 10What is an example of recursion?We know that in python, a function can call other functions. It is even possible for the function to call itself. These types of construct are termed as recursive functions.
    Below is an example of recursive function to find the factorial of an integer.
    Factorial of a number is the product of all the integers from 1 to that number. For example, the factorial of 6 (denoted as 6) is 1*2*3*4*5*6.

Information

Description
A level Computing Flashcards on Fundamentals of programming, created by Noah Barker on 09/11/2022.
Created by
Noah Barker
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?