Changes

Jump to navigation Jump to search
237 bytes added ,  11:27, 4 August 2016
no edit summary
Line 38: Line 38:     
5. Create 3x4x5x6 array and fill with numbers 1 to 100
 
5. Create 3x4x5x6 array and fill with numbers 1 to 100
 +
===Answer===
 +
|3x4x5x6|.fillwith(1..100)
    
6. Do same and fill with random numbers.  
 
6. Do same and fill with random numbers.  
 +
===Answer===
 +
|3x4x5x6|.random(100)
    
7. Do same and fill with cube root of numbers 1 to 100
 
7. Do same and fill with cube root of numbers 1 to 100
 +
===Answer===
 +
|3x4x5x6|.fillwith(CUBEROOT(1..100))
    
8. Create an equation or formula for surface area of a cylinder. Try to do with units. Do this as a function that converts and does it on units supplied by user automatically if possible.  
 
8. Create an equation or formula for surface area of a cylinder. Try to do with units. Do this as a function that converts and does it on units supplied by user automatically if possible.  
 +
===Answer===
 +
Surface Area of a cylinder : 2πrh
 +
  ar:=2<*>π<*>(r<>(cm))<*>((h<>(cm))<+>(r<>(cm)))
 +
  ar(10,30)
 +
    
9. Create a function that given the radius and height of a cylinder, returns an array of radius height surface area and volume. Use Greek letters to be similar to formula that are generally used.  
 
9. Create a function that given the radius and height of a cylinder, returns an array of radius height surface area and volume. Use Greek letters to be similar to formula that are generally used.  
writer
5,435

edits

Navigation menu