CSC180H1 Lecture Notes - Lecture 10: Readme

19 views2 pages
27 May 2019
School
Course

Document Summary

* if you are having problems contact me; i need to be aware of conceptual problems that are blocking you. If you haven"t tried the exercises, then clearly that is a problem. However, if you"ve done exercises, and have a solution that doesn"t work, we can work with that. * recap: sqrt def sqrt(u,accy): estimate = float(u-1) while abs(estimate*estimate - u) > accy: estimate = 0. 5*(estimate + u/estimate) return estimate. * recap: factorial def fact(n): p=1 for i in range(1,n+1): p = p*i return p. * recap: power def pow(x,u): p=1 for i in range(0,u): p=p*x return p. * rewrite power as a recursion def pow(x,u): if u==0: return 1 else: return x*pow(u-1) If you want to read it, use the "cat" command: cat /n/share/copy/csc180f/lab2/readme. If you want to follow the instructions, you"ll be told to copy two files to a location where your program is located.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions