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

Flashcards

Business Science ( Ignacio)

Roel Hesselink Computer Science for business CEO/Director General English 34 cards

Cards in this deck (34)

  1. 1What is the DOM and why is it important for web page rendering?DOM stands for Document Object Model, and represents the hierchichal structure of the elements that make up an HTML page.
  2. 2What was the main reason why main frames stopped handling ALL the processes needed to load pages, and started relying more on client computers?As technology advanced, more computational power was required to handle new tasks. With the improved capacity of consumer computers, client-server architecture was preferred to delegate tasks to clients to allow servers to handle more specific tasks that only they could be responsible for.
  3. 3In HTML, what is a tag?They are the basic building blocks of HTML pages that represent an element of the page.
  4. 4In HTML, what is a "form" tag used for?It is used to collect information from the user to later send to the backend server for processing.
  5. 5In Javascript, what is a query selector, and what is it used for?It is used to select specific elements based on a criteria such as type, class, or id.
  6. 6Explain the "cascading" behavior in CSS.Unless overridden, a child element will inherit the CSS properties of the parent element.
  7. 7In CSS, what are the three types of selectors available, and what are their uses?Type selectors are used to apply styles to all elements of that type (i.e. ); class selectors are used to apply styles to elements that have a specific class set (i.e. ); id selectors are used to apply styles to a unique element with that id (i.e. ).
  8. 8In Javascript, why is the "DOMContentLoaded" event listener important?It indicates when a page's HTML elements have been loaded. It is important to be able to apply pre-programmed behavior to HTML elements after they have been rendered. Otherwise, the page would encounter errors because you cannot apply a behavior such as a function on an element before it has been rendered (chicken and egg problem).
  9. 9What is an IDE, and what is it used for?It stands for Integrated Development Environment, and it is a software program that contains multiple tools useful for software development.
  10. 10What is a compiler and why is it important?A compiler does two main jobs: 1) it verifies that the code written follows all the necessary syntax rules of the programming language and notifies the developer if that is not the case, and 2) it compiles (translates) the code into information that the computer can execute since computers only understand very specific formats such as binary code.
  11. 11What is the difference between a syntax error and a logical error?A syntax error is detected by a compiler, and it means that your code does not follow the syntax rules of the programming language, and as such, it cannot be compiled nor executed. A logical error is not detected by a compiler, which means the program is correctly translated, but during the execution of the program, an unexpected situation is encountered, causing the program to crash. An example of this last type of error would be an unhandled division-by-zero situation.
  12. 12Which of the following statements is true? Explain your choice.b) A compiler does not allow syntax errors
    A compiler does not execute the code, it simply validates that it follows the syntax rules of the programming language, and translates it for the computer to run.
  13. 13What is "indentation" and why is it important in Python?It is space to the left of a line of code to indicate that it belongs to a block of code.
  14. 14What is an infinite loop and how do you avoid one?It is a loop whose stop condition is never reached, effectively causing the program to remain stuck in an unescapable situation. You avoid it by ensuring that the stop condition is eventually reached during the execution of the loop's code.
  15. 15What is an unreachable loop and how do you avoid one?It is a loop whose stop condition is reached before the loop starts, causing the code inside the loop to never be executed. You avoid this by confirming that the stop condition is not true before the loop starts, or alternatively, verifying that the loop is even needed at all.
  16. 16What is the difference between = and ==?One sign means you are assigning a value to a variable. Two signs means you are comparing two values to determine whether they are equal or not.
  17. 17If you wanted to create a loop, how would you decide between using a for and a while?A "for" loop is used when you know beforehand how many cycles you need to execute. A "while" loop is used when you don't know how many cycles you need to execute but instead the loop is ruled by a condition.
  18. 18What is a flag variable?It is a boolean value used to determine when a loop is done.
  19. 19What is a boolean?A value that can only be either true or false.
  20. 20What is the difference between a map and a list?A list has a first value, a last value, and a precedence of the elements inside it indicated by their position relevant to each other represented by the index.
    A map does not care for the order of the elements, and uses an identifying value known as the "key" to ensure uniqueness of its elements.
  21. 21What is the difference between an insert and an append?An append adds a value to the end of a list while an insert allows you to add a value to a specific position of the list.
  22. 22Why is it preferable to use data structures to handle varied data than using multiple variables?If you had to handle 100 different values, you would have to create 100 different variables with different names to be able to store that information and handle it. A data structure allows you to use a single variable name to represent the collection, and then a numerical index to represent each of the elements of the collection. Data structures also come with pre-built functions (append, insert, pop) that can be used to accomplish logic that you would otherwise have to define yourself.
  23. 23What is an index?It represents the position of an element within a list.
  24. 24What happens if you try to access an index that exceeds a list's length?You get a logical error known as "index out of bounds".
  25. 25What is an algorithm?It is a series of steps that take an input to be processed to obtain a desired output.
  26. 26Why is BigO important in computer science?It allows you to compare the execution speed of algorithms.
  27. 27What is a brute force algorithm?It is an algorithm that takes an exhaustive approach in the search for a solution. It tries all possible solutions until it finds what it is looking for.
  28. 28What are the two main characteristics that an algorithm must have? Explain why.Correct: it has to solve the problem at hand.
    Precise: the instructions must be clear and understandable.
  29. 29When implementing a search algorithm, what must you consider when deciding whether to use a brute force search or a binary search?A binary search can only be executed if the information on which the search is being performed has been previously sorted. A brute force search does not require this since it will validate all possibilities to find a solution.
  30. 30What is a stream?It is a channel through which information is transmitted.
  31. 31What are the different modes you can use when streaming a file?r: read only
    a: append mode
    x: creates a new file and writes to it, but does not overwrite existing files
    w: creates or overwrites existing files, and allows you to write into them
  32. 32Why is it important to close a stream after done using it?Streams require resources, and if left open, the resources will continue to be consumed until the computer is restarted.
  33. 33What does "CSV" stand for?Comma-separated values.
  34. 34Which is the default stream mode?Read only for safety reasons to avoid accidental loss of information.

Information

Description
CEO/Director General Computer Science for business Flashcards on Business Science ( Ignacio), created by Roel Hesselink on 04/07/2023.
Created by
Roel Hesselink
Views
2
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?