JumaRA / Assignments

0 stars 0 forks source link

Syntax correction #1

Open kogos opened 10 years ago

kogos commented 10 years ago

Please edit the instances of ':param' to '@param'. You can refer to the link below for an example Example

JumaRA commented 10 years ago

Thanks I will change it

On 31 August 2014 10:44, kogos notifications@github.com wrote:

Please edit the instances of ':param' to '@param https://github.com/param'. You can refer to the link below for an example Example http://aims-ghana.github.io/python-course/days/02_varfun.html

— Reply to this email directly or view it on GitHub https://github.com/JumaRA/Assignments/issues/1.

JumaRA commented 10 years ago

if dim_complete(length) and dim_complete(width) and dim_complete(height): if dim_letter(length) and dim_letter(width) and dim_letter(height): if dim_sign(length) and dim_sign(width) and dim_sign(height): return length_width_height else: raise ValueError("side is less than 0: ") raise TypeError("value is a string") raise AttributeError("dimension not provided")

On 31 August 2014 10:13, Rebecca Juma rebecca@aims.edu.gh wrote:

Thanks I will change it

On 31 August 2014 10:44, kogos notifications@github.com wrote:

Please edit the instances of ':param' to '@param https://github.com/param'. You can refer to the link below for an example Example http://aims-ghana.github.io/python-course/days/02_varfun.html

— Reply to this email directly or view it on GitHub https://github.com/JumaRA/Assignments/issues/1.

JumaRA commented 10 years ago

def dim_complete(dim): """ Tests that dim is provided

>>> dim_complete(1)
True
  """
if dim is not None:
    return True

On 2 September 2014 20:40, Rebecca Juma rebecca@aims.edu.gh wrote:

if dim_complete(length) and dim_complete(width) and dim_complete(height): if dim_letter(length) and dim_letter(width) and dim_letter(height): if dim_sign(length) and dim_sign(width) and dim_sign(height): return length_width_height else: raise ValueError("side is less than 0: ") raise TypeError("value is a string") raise AttributeError("dimension not provided")

On 31 August 2014 10:13, Rebecca Juma rebecca@aims.edu.gh wrote:

Thanks I will change it

On 31 August 2014 10:44, kogos notifications@github.com wrote:

Please edit the instances of ':param' to '@param https://github.com/param'. You can refer to the link below for an example Example http://aims-ghana.github.io/python-course/days/02_varfun.html

— Reply to this email directly or view it on GitHub https://github.com/JumaRA/Assignments/issues/1.

JumaRA commented 10 years ago

function x = mysecant(f,x0,x1,n) format long % prints more digits format compact % makes the output more compact % Solves f(x) = 0 by doing n steps of the secant method % starting with x0 and x1. % Inputs: f -- the function , input as an inline function % x0 -- starting guess , a number % x1 -- second starting geuss % n -- the number of steps to do % Output: x -- the approximate solution y0 = f(x0); y1 = f(x1); for i = 1:n % Do n times x = x1 - (x1-x0)*y1/(y1-y0) % secant formula. y=f(x) % y value at the new approximate solution. % Move numbers to get ready for the next step x0=x1; y0=y1; x1=x; y1=y; end

On 2 September 2014 20:48, Rebecca Juma rebecca@aims.edu.gh wrote:

def dim_complete(dim): """ Tests that dim is provided

>>> dim_complete(1)
True
  """
if dim is not None:
    return True

On 2 September 2014 20:40, Rebecca Juma rebecca@aims.edu.gh wrote:

if dim_complete(length) and dim_complete(width) and dim_complete(height): if dim_letter(length) and dim_letter(width) and dim_letter(height): if dim_sign(length) and dim_sign(width) and dim_sign(height): return length_width_height else: raise ValueError("side is less than 0: ") raise TypeError("value is a string") raise AttributeError("dimension not provided")

On 31 August 2014 10:13, Rebecca Juma rebecca@aims.edu.gh wrote:

Thanks I will change it

On 31 August 2014 10:44, kogos notifications@github.com wrote:

Please edit the instances of ':param' to '@param https://github.com/param'. You can refer to the link below for an example Example http://aims-ghana.github.io/python-course/days/02_varfun.html

— Reply to this email directly or view it on GitHub https://github.com/JumaRA/Assignments/issues/1.