Difference between revisions of "CSC111 Final Exam 2018"
Line 251: | Line 251: | ||
==== RESTART: final4.py ==== | ==== RESTART: final4.py ==== | ||
> [ ] | > [ ] | ||
+ | |||
False | False | ||
>>> | >>> | ||
==== RESTART: final4.py ==== | ==== RESTART: final4.py ==== | ||
> [ 100 ] | > [ 100 ] | ||
+ | |||
False | False | ||
>>> | >>> | ||
==== RESTART: final4.py ==== | ==== RESTART: final4.py ==== | ||
> [ 100, 2 ] | > [ 100, 2 ] | ||
+ | |||
False | False | ||
>>> | >>> | ||
==== RESTART: final4.py ==== | ==== RESTART: final4.py ==== | ||
> [ 34, 34 ] | > [ 34, 34 ] | ||
+ | |||
True | True | ||
>>> | >>> | ||
==== RESTART: final4.py ==== | ==== RESTART: final4.py ==== | ||
> [ 1, 2, 3, 4, 1, 2, 3, 4 ] | > [ 1, 2, 3, 4, 1, 2, 3, 4 ] | ||
+ | |||
False | False | ||
>>> | >>> | ||
==== RESTART: final4.py ==== | ==== RESTART: final4.py ==== | ||
> [ 1, 2, 3, 4, 5, 5 ] | > [ 1, 2, 3, 4, 5, 5 ] | ||
+ | |||
True | True | ||
>>> | >>> | ||
==== RESTART: final4.py ==== | ==== RESTART: final4.py ==== | ||
> [ 1, 2, 3, 4, 4, 5, 6, 7 ] | > [ 1, 2, 3, 4, 4, 5, 6, 7 ] | ||
+ | |||
True | True | ||
>>> | >>> | ||
Line 286: | Line 293: | ||
def main(): | def main(): | ||
bananas = eval(input( "> " ) ) | bananas = eval(input( "> " ) ) | ||
+ | print() | ||
success = lookFor2( bananas ) | success = lookFor2( bananas ) | ||
print( success ) | print( success ) |