CSC148H1 Lecture : jan25c.docx

46 views2 pages
11 Jan 2013
School
Course
Professor
katrinasavvy and 38715 others unlocked
CSC148H1 Full Course Notes
1
CSC148H1 Full Course Notes
Verified Note
1 document

Document Summary

Expected " : + str(expect) + ". ", expect = expect - 1, def empty_suite(), return unittest. testloader(). loadtestsfromtestcase(stackemptytestcase, def all_suite(), return unittest. testloader(). loadtestsfromtestcase(stackalltestcase, if __name__ == "__main__", runner = unittest. texttestrunner(, runner. run(empty_suite(), runner. run(all_suite()) >>> in e 3: g"s i variable is different from f"s i variable, def h(i), print in g", i, if i < 3, h(i + 1, output: in h 1 in h 2 in h 3. Globals() shows the dictionary with all the names stored and builtins. Locals() same as globals() in module, in functions it change. Write a fib function to calculate the fibonnaci numbers: fib(0) = 1, fib(1) = 1, fib(n) = fib(n-1) + fib(n 2, 1, 1, 2, 3, 4, 8, 13. Recursive minimum function: reduces the list by 1 item each time until its 1 item, returns it, compares it w/ the first item of the 2 items list one level higher.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions