


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
INTRO TO PYTHON FINAL EXAM SOLVED #8
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



A reusable chunk of code with inputs and outputs - correct answer Function A name that can be associated with a value - correct answer Variable A control structure for performing actions on each element of a sequence - correct answer For loop A control structure for branching the execution of a program - correct answer If statement A data structure for mapping keys to values - correct answer Dictionary A data structure for storing elements in an ordered sequence - correct answer List A categorization of values of similar kinds that determines what you can do with the values - correct answer Type A sequence of data stored in your computer's long term memory - correct answer File Specific instances of data written directly in source code - correct answer Literal value A type that represents textual data - correct answer String A collection of functions, classes, and variables available to be imported - correct answer Module A combination of data and functions that can encapsulate behavior into a new type - correct answer Class An instance of a class - correct answer Object A sequence of coded instructions that manipulate data inside a computer - correct answer Program, While, or Method "2.0" - correct answer String "Python" - correct answer String -1.4 - correct answer Float [1, 2, 3] - correct answer List
'' - correct answer String {} - correct answer Dictionary True - correct answer Boolean None - correct answer None [] - correct answer List {1:2} - correct answer Dictionary "True" - correct answer String -100000257 - correct answer Integer (1, 2, 3) - correct answer Tuple or Set While - correct answer Keyword Boolean - correct answer Type Float - correct answer Type For - correct answer Keyword Print - correct answer Built in function Class - correct answer Keyword Integer - correct answer Type In - correct answer Keyword Map - correct answer Built in function Def - correct answer Keyword Dictionary - correct answer Type Input - correct answer Built in function Import - correct answer Keyword String - correct answer Type
The statement count = count + 1 will cause an error because no number can be greater than itself - correct answer False List comprehensions cannot express everything that a for loop can - correct answer False Dictionaries will always have at least one key and one value - correct answer False Dictionaries are useful because you can have duplicate keys - correct answer False Variables can be used as the keys of a dictionary - correct answer True Keys can be added to the dictionary after its been created - correct answer True Lists can be composed of Dictionaries - correct answer True Dictionaries cannot be composed of lists - correct answer False Unlike Lists, Tuples are immutable, meaning Tuples cannot be changed after they are created - correct answer True Tuples are composed of key/value pairs - correct answer False A while loop will always be executed at least once - correct answer False A while loop will execute once for each expression in the conditional - correct answer False A for loop will process a file sentence by sentence - correct answer False The open function consumes a string representing a path and returns a string of the file's contents - correct answer False You must import the json module before you can use the load function - correct answer True