CPSC 217 Final Exam With 100% Correct And Verified Answers 2024
CPSC 217 Final Exam With 100% Correct And Verified Answers 2024 list[x] = - Correct Answer-pulls a value at that specific index number. For lists, tuples length of structures - Correct Answer-0 to length. Lists, sets, tuples, dictionaries if (value) in (type) OR not in - Correct Answer-check whether a specific value exists in a type. Lists, tuples, sets, dictionaries len(list) - Correct Answer-Gives length of your type. Lists, tuples, sets, dictionaries d(value) - Correct Answer-Attach a value to end of your type. Lists, sets t(index,value) - Correct Answer-Insert a value in a specific position. Will shift all other elements around it. Lists () - Correct Answer-sorts all elements in a type alphabetically. lists se() - Correct Answer-reverses the current order of your type. lists (value) - Correct Answer-number of times a value appears in type. lists, tuples, sets tuple1+tuple2 - Correct Answer-joins two types into a larger one. tuples, sets tuple*x - Correct Answer-creates type with x amount of repeating values of original. tuples, sets (value) - Correct Answer-returns index of first item with that value. Lists, tuples () - Correct Answer-returns a list of all keys in a dictionary () - Correct Answer-returns all items in a dictionary () - Correct Answer-clears a dictionary e(value) - Correct Answer-removes the first value occurrence in a list add/update/remove/discard(value) - Correct Answer-edits a set Lists - Correct Answer-square brackets. Ordered mutable structure which can have any value within it, including other structures tuples - Correct Answer-round brackets. immutable lists. Only accepts immutable types of data. sets - Correct Answer-squiggle brackets with commas between items. mutable unordered list. Needs unique characters dictionary - Correct Answer-squiggle brackets with key:value. Indexed by key. Both keys must be immutable types. Can have other structures as its values strings - Correct Answer-immutable tuple of character structures mutable types - Correct Answer-lists, dictionaries, sets immutable types - Correct Answer-boolean, strings, floats, integers, tuples list[start:end:step] - Correct Answer-Creating a copy of a type. Can add optional parameters as integers. Start index, non-inclusive end index, amount of items to skip in between. Lists, tuples dictionary[key] = value - Correct Answer-Adding key and value to a dictionary Bloom's Taxonomy - Correct Answer-remember, understand, apply, analyze, evaluate, create Algorithm - Correct Answer-A methodical, logical procedure that solves a particular problem. Flowchart or pseudocode Programming - Correct Answer-Process of creating software by converting algorithms to computer language Syntax - Correct Answer-Rules around coding language and what does what Semantics - Correct Answer-When coded, what does the statement do exactly Complier - Correct Answer-Translating the source code into machine language, executes it all at once interpreter - Correct Answer-Translates and executes a program one statement at a time. Python is a compiled interpreted language - Correct Answer-First compiled into language, then interpreted by virtual machine Precedence of Python Operators - Correct Answer-parentheses, exponent, unary, multiply/divide/floor division/remainder division, add/subtract, equal/not equal/greater
Document information
- Uploaded on
- February 27, 2024
- Number of pages
- 3
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers