User Tools

Site Tools


cs330_f2016:lab5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs330_f2016:lab5 [2016/09/17 17:07]
dcostello
cs330_f2016:lab5 [2021/06/30 23:42] (current)
Line 8: Line 8:
 ====Preparation:​==== ====Preparation:​====
  
-For this lab, you should use Julia v.0.4. ​ You may use the binary hosted in Dr. Wingate'​s home directory, at+For this lab, you should use at least Julia v.0.4. ​ You may use the binary hosted in Dr. Wingate'​s home directory, at
  
 ''/​users/​faculty/​wingated/​cs330/​languages/​julia-2e358ce975/​bin''​ ''/​users/​faculty/​wingated/​cs330/​languages/​julia-2e358ce975/​bin''​
Line 77: Line 77:
 type Pixel type Pixel
   r::Real   r::Real
-  b::Real 
   g::Real   g::Real
 +  b::Real
 end end
 </​code>​ </​code>​
Line 123: Line 123:
 function average_age(tree) function average_age(tree)
 </​code>​ </​code>​
-Calculates the average age of the people in the tree. Use this years date 2016. Unknowns do not count as people.+Calculates the average age of the people in the tree. Use this years date 2017. Unknowns do not count as people.
  
 === tree map === === tree map ===
Line 135: Line 135:
 function add_last_name(name::​AbstractString,​ tree) function add_last_name(name::​AbstractString,​ tree)
 </​code>​ </​code>​
-Appends name to the end of the name of each member of the tree. You should use tree_map.+Appends name to the end of the name of each member of the tree. You should use tree_map. You do not need to add a space in front of the name.
  
 Hint: Julia uses ''​*''​ for string concatenation. Hint: Julia uses ''​*''​ for string concatenation.
cs330_f2016/lab5.1474132068.txt.gz · Last modified: 2021/06/30 23:40 (external edit)