Unit #5-01

Learning Outcome

At the end of this lesson, you will be able to:

Review

Lesson

Daily Assignment

Extra

package main
import (
"fmt"
"math/rand" "time")
func main() {
s1 := rand.NewSource(time.Now().UnixNano()) r1 := rand.New(s1) fmt.Println(r1.Intn(100))
fmt.Println("\nDone.")}

Selection Component

NOTE: The generation of the random number is outside the function; this is so it is generated just once and does not change. YES, it is a global variable.

Guess Numbers Program