Engineering 102 Exams 1 & 2 TAMU Ijaz
questions with Complete Solutions |100% Pass
True or False: Tuples can be changed - ✔✔False
True or False: sets have indexes - ✔✔False
Can variable names start with an integer? - ✔✔NO
Can variables start with an underscore? - ✔✔YES
order of conditional statements - ✔✔if, elif, else
Can numbers go through loops? - ✔✔NO
what is a python function? - ✔✔only run when called
, Do numbers (floats & ints) have indexes? - ✔✔NO
List 3 mutable data types - ✔✔Lists, Sets, Dictionaries
List 6 immutable data types - ✔✔int, float, string, chr, tuple, boolean
Add 'Orange' and 1 to the dictionary mydict - ✔✔mydict['Orange'] = 1
top-down vs bottom-up design - ✔✔top-down:
Code directed to overall goal
Code can become too specialized
While developing, much code incomplete
bottom-up:
Code development less focused on goal
Promotes reuse of Code
Code can be tested easily
FloatingPointError - ✔✔Raised when a floating point operation fails
IndexError - ✔✔Raised when the index of a sequence is out of range
questions with Complete Solutions |100% Pass
True or False: Tuples can be changed - ✔✔False
True or False: sets have indexes - ✔✔False
Can variable names start with an integer? - ✔✔NO
Can variables start with an underscore? - ✔✔YES
order of conditional statements - ✔✔if, elif, else
Can numbers go through loops? - ✔✔NO
what is a python function? - ✔✔only run when called
, Do numbers (floats & ints) have indexes? - ✔✔NO
List 3 mutable data types - ✔✔Lists, Sets, Dictionaries
List 6 immutable data types - ✔✔int, float, string, chr, tuple, boolean
Add 'Orange' and 1 to the dictionary mydict - ✔✔mydict['Orange'] = 1
top-down vs bottom-up design - ✔✔top-down:
Code directed to overall goal
Code can become too specialized
While developing, much code incomplete
bottom-up:
Code development less focused on goal
Promotes reuse of Code
Code can be tested easily
FloatingPointError - ✔✔Raised when a floating point operation fails
IndexError - ✔✔Raised when the index of a sequence is out of range