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

Flashcards

Unit 1 Ada Developer Academy

Kathryn Munson Computer Science English 45 cards

Unit 1 Ada Developer Academy

Cards in this deck (45)

  1. 1SetAbstract data type that stores unique values in no particular order
    "I added this project to my set of demos"
  2. 2Subject: Sets Union syn: JunctureUnion of sets creates new set with all elements from input sets.
    set_1.union(set_2)
    set_1 | set_2
    Subject: Sets Union syn: JunctureSubject: Sets Union syn: Juncture
  3. 3Subject: Sets Intersection syn: OverlapThe intersection of 2 sets, where a new set is created containing only elements each set has in common
    set_1.intersection(set_2)
    set_1 & set_2
    Subject: Sets Intersection syn: OverlapSubject: Sets Intersection syn: Overlap
  4. 4Subject: Sets DifferenceDifference of 2 sets A and B, where a new set is created out of elements in set A that is not also found in set B
    set_1.difference(set_2)
    set_1 - set_2
    Subject: Sets DifferenceSubject: Sets Difference
  5. 53 rules of sets1.Each element of a set is unique.
    2.Each element of a set must be immutable.
    3.Elements in a set are unordered.
  6. 6How to determine if a set is subset of anothereditors = {"Lorraine", "Colin", "Aedan"}
    authors = {"Lorraine", "Colin", "Aedan", "Ajwa", "Ciara"}
    editors.issubset(authors)
    # evaluates to True
    editors <= authors
    # evaluates to True
  7. 7How to determine if set is a proper subseteditors = {"Lorraine", "Colin", "Aedan"}
    authors = {"Lorraine", "Colin", "Aedan", "Ajwa", "Ciara"}
    editors < authors
    # evaluates to True
    users = {"Lorraine", "Colin", "Aedan"}
    users < editors
    # evaluates to False
  8. 8Disjoint2 sets are disjoint if they have no overlapping elements
    set_1.disjoint(set_2)
  9. 9How to declare a setset()
    {'item1', 'item2', 'item3'}
  10. 10Add to setany_set.add(number)
  11. 11Delete from setany_set.remove(number)
    any_set.discard(string)
  12. 12Remove and return random value from setset_1.pop()
  13. 13Remove all elements from setany_set.clear()
  14. 14TupleImmutable data type that can store unordered values. Length and data type never changes.
  15. 15MutableChangeable
  16. 16ImmutableFixed, unchangeable
  17. 173 methods to create tuple#1
    example_tuple_1 = tuple([1, 2, 3, 3])
    #2
    example_tuple_2 = (1, 2, 3, 3)
    #3
    example_tuple_3 = 1, 2, 3, 3
  18. 18Create tuple with one elementfood = ('banana',)
    must include a trailing comma
  19. 19Tuple operations (2)1. concatenation
    tuple + tuple
    2. repetition
    tuple * 3
  20. 20How do you use tuples to return multiple values from function?example:
    return False, None
    implicit tuple created with comma
  21. 21JSONa lightweight data-interchange format that can hold objects, arrays, strings, numbers, booleans, and other formats. Intentionally language-independent.
  22. 22Stack Trace Syn: TracebackA report of the active stack frames at a certain point in time during the execution of a program. Reports error messages and details about that error
  23. 23CPU syn: ProcessorCentral processing unit
    The CPU is a physical bunch of electronic circuitry located in a small package on the main board, or motherboard, of the computer. We can think of it as many tiny gates that let specific patterns of electricity flow along very precisely defined paths (that are etched with light!). By controlling the gates, and altering the flow of the electricity, the CPU does something very important: it executes instructions from software.
  24. 24Physical MemoryThe CPU will process many instructions that require data to be stored.
    Physical memory devices hold this data. Like the CPU, physical memory is itself a package of electrical circuits. It holds the patterns of electricity that the CPU interprets as data. The CPU uses physical memory by writing data to it and reading data from it.
  25. 25RAMRAM, or Random-access memory, is a form of computer memory. RAM sticks are physical memory devices that attach to a motherboard.
    1. RAM is fast
    2. RAM holds data temporarily
  26. 26storagewhere data can be kept for the long-term. A common example of this is a hard disk drive in a computer.
  27. 27interfaceA medium that takes information from one source, and passes it to another source.The interface usually makes a meaningful translation between the two sources.
  28. 28ExpressionA unit of code that can be evaluated into one value
    "The expression 999 > 0 is True!"
  29. 29StatementA unit of code that is used to execute a change
    foo = "A value for foo"
    Assigns the variable foo to a value
  30. 30Conditional ExpressionAn expression that evaluates to either truthy or falsy, typically used in order to determine if a conditional requirement is met. Usually used with if statements.
  31. 31Automated TestScripts that test specific code for correct functionality
  32. 32Unit TestScripts designed to test the performance of a single function
  33. 33Nominal Test CasesA nominal test case is a type of test case that describes a piece of core functionality needed for the success of this method.
  34. 34Edge Test CasesThis is the test case that verifies that the function works, even with very unexpected input.
  35. 35Positive Edge Test Casetest case that describes a set of inputs and expectations that are on the limits of the method's most obvious, most typical way of working successfully.
  36. 36Negative Edge Test Casea test case that tests that this function can handle the most non-obvious, most atypical unexpected input gracefully
  37. 37Qualities of trustworthy test suite1. large test coverage
    2. readable
    3. covers many scenarios
  38. 38Object IdentityAn object's unique identity that never changes once it's been created. Usually a number. Similar to an object's address in memory. Find this with id(obj). In a comparison that uses is, Python compares object IDs.
  39. 393 A's of useful test structureArrange
    Act
    Assert
  40. 40NameErrorLocal or global name not found
  41. 41ZeroDivisionErrorerror from trying to divide by zero
  42. 42OverflowErrortrying arithmetic operation too large to be represented
  43. 43Syntax errorspelling, grammar
  44. 44TypeErroroperation or function applied to object of inappropriate type
  45. 45KeyboardInterruptuser hits the interrupt key (control C or delete)

Information

Description
Computer Science Flashcards on Unit 1 Ada Developer Academy, created by Kathryn Munson on 12/03/2023.
Created by
Kathryn Munson
Views
4
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?