CMPT 120 Study Guide - Midterm Guide: Object-Oriented Programming
meghan78 and 39786 others unlocked
29
CMPT 120 Full Course Notes
Verified Note
29 documents
Document Summary
Cmpt 120 - introduction to computing science and programming. Instructions: provide answers to these questions on these pages only. ___[ 60. 0, 49, "harold hophozophen"]: what is the result of the following expression: range(14, 20)= _[14, 15, 16, 17, 18, 19] , suppose you had a list of your favourite colours called colours represented as strings. Then what is the value of the following expression? (2 in colours) ___ false __: what is the value of this expression? (["red", "blue"]+["orange"])[1] __ ["z", "b", "c", "d", "e", "f"]: suppose x is any list, then what is the value of the following expression? x + [] == x. Remember that two lists are equal if they are the same length and have the same corresponding elements. Return true if the lists are equal and false otherwise. Make sure the function works for the empty list []. You may not use the python expression, x1==x2, in your answer.