Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> def min_value(nums): small = nums[0] for i in nums[1:]: if i < small: small = i >>> def min_value(nums): small = nums[0] for i in nums[1:]: if i < small: small = i return small >>> min_value([8, 7, 10, 12, 7, 4, 6]) 4 >>> min_value([]) Traceback (most recent call last): File "", line 1, in min_value([]) File "", line 2, in min_value small = nums[0] IndexError: list index out of range >>> min_value(3) Traceback (most recent call last): File "", line 1, in min_value(3) File "", line 2, in min_value small = nums[0] TypeError: 'int' object is not subscriptable >>> type([3, 4, 5]) >>> type(4) >>> p = [8,7,10,12, 7, 4, 6] >>> p.index(10) 2 >>> 2**10 1024 >>> 2**20 1048576 >>> ============ RESTART: D:\CSI33F19\Python3\Chapter1\time_search.py ============ 0.015067338943481445 0.009025335311889648 0.0 >>> ============ RESTART: D:\CSI33F19\Python3\Chapter1\time_search.py ============ 0.1614363193511963 0.08225274085998535 0.0 >>> ============ RESTART: D:\CSI33F19\Python3\Chapter1\time_search.py ============ 0.0 0.0 0.0 >>>