2023-10-25 11:55:04 -04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
|
2024-02-03 11:00:34 -05:00
|
|
|
"trying_out_go/pkg/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)
|
|
|
|
}
|