package
0.0.0-20211212162911-6c9bd3a40a2b
Repository: https://github.com/striversity/glft.git
Documentation: pkg.go.dev
# README
Section 03 Exercise 03 - Declaring and Using Slices
Create a go program which does the following
TODO 1
- Declares an array of 10 to 20 elements of type float64
- use a const for the array size
- Initialize a Slice from the Array, such that the Slice has the same length as the Array.
- NOTE: The 'ONLY' purpose of the Array is to initialize the Slice in the program. Don't use the Array in any other part of the program.
TODO 2
- Using the slice, store random currency values using 'input.GetRandFloat()'.
- TIP:
- See Section 02 - Lecture 10 for the currency type
- Use a 'for' loop to initialize your array values
- The 'input' package is github.com/striversity/glft/shared/input and was covered in Sec01-Lec12.
- TIP:
TODO 3
- Use the slice to calculate total, max, min, avg