Engineering 102 Final Exam questions
and Answers 100% Solved
import statements are case sensitive - ✔✔true import abc is not equal to import AbC
importing py files requires import filename.py - ✔✔false, it would just be import filename
benefits of numpy (2) - ✔✔1) more mathematical support (more functions) 2) faster operations
shape of array - ✔✔a tuple of the lengths of the arrays dimensions (rows by columns, in a
sense)
size of array - ✔✔number of elements in an array
how to import matplotlib for graphing - ✔✔import matplotlib.pyplot as plt
Individual elements are often called "nodes", true or false - ✔✔true
In computing, a hierarchy is often called "a tree", true or false - ✔✔true
In computing, the base of a hierarchy are often called a "leaf", true or false - ✔✔false, they are
called...
Hierarchies capture all relationships and it is always clear how things should be separated, true
or false - ✔✔false
Top-down approach should always be my first approach to a program, true or false - ✔✔true
, In top-down, continue to break down the problem into smaller steps until implementing a
concept will take just a few lines of code, true or false - ✔✔true
A function body can be thought of as its own, separate program, true or false? - ✔✔true
What is the output of the following code?
def myfunc(): a = 3 print(a,end='') a = 7 print(a, end='') myfunc() print(a, end='') - ✔✔7.3.7.
What objects are mutable? - ✔✔lists and dictionaries
what objects are immutable? - ✔✔integers, floats, complex numbers, Booleans, strings, tuples
return statements can return value - ✔✔only one
special elements which allow return to be "multiple" elements - ✔✔tuples and lists
a function with no return value returns... - ✔✔"None"
def user_function(number + 5), valid or invalid? - ✔✔invalid
parameters = - ✔✔= variables
and Answers 100% Solved
import statements are case sensitive - ✔✔true import abc is not equal to import AbC
importing py files requires import filename.py - ✔✔false, it would just be import filename
benefits of numpy (2) - ✔✔1) more mathematical support (more functions) 2) faster operations
shape of array - ✔✔a tuple of the lengths of the arrays dimensions (rows by columns, in a
sense)
size of array - ✔✔number of elements in an array
how to import matplotlib for graphing - ✔✔import matplotlib.pyplot as plt
Individual elements are often called "nodes", true or false - ✔✔true
In computing, a hierarchy is often called "a tree", true or false - ✔✔true
In computing, the base of a hierarchy are often called a "leaf", true or false - ✔✔false, they are
called...
Hierarchies capture all relationships and it is always clear how things should be separated, true
or false - ✔✔false
Top-down approach should always be my first approach to a program, true or false - ✔✔true
, In top-down, continue to break down the problem into smaller steps until implementing a
concept will take just a few lines of code, true or false - ✔✔true
A function body can be thought of as its own, separate program, true or false? - ✔✔true
What is the output of the following code?
def myfunc(): a = 3 print(a,end='') a = 7 print(a, end='') myfunc() print(a, end='') - ✔✔7.3.7.
What objects are mutable? - ✔✔lists and dictionaries
what objects are immutable? - ✔✔integers, floats, complex numbers, Booleans, strings, tuples
return statements can return value - ✔✔only one
special elements which allow return to be "multiple" elements - ✔✔tuples and lists
a function with no return value returns... - ✔✔"None"
def user_function(number + 5), valid or invalid? - ✔✔invalid
parameters = - ✔✔= variables