2023-10-25 11:55:04 -04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
|
2024-01-11 11:18:00 -05:00
|
|
|
"git.linuxhg.com/Go_Training/keyboard"
|
2023-10-25 11:55:04 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
func passFail() {
|
|
|
|
fmt.Print("Enter a grade: ")
|
|
|
|
grade, err := keyboard.GetFloat()
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
var status string
|
|
|
|
|
|
|
|
if grade >= 60 {
|
|
|
|
status = "passing"
|
|
|
|
} else {
|
|
|
|
status = "failing"
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Println("A grade of", grade, "is", status)
|
|
|
|
}
|