Last active
May 11, 2024 01:59
-
-
Save filipearray/5f546faf3d18e1a45ef436b420946faf to your computer and use it in GitHub Desktop.
Weather Forecast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package weather shows the current condition of the place you want to know about. | |
package weather | |
// CurrentCondition variable shows the current condition of the place you want to know about. | |
var CurrentCondition string | |
// CurrentLocation variable gets the place you want to know about. | |
var CurrentLocation string | |
// Forecast function is responsible for gathering the current condition information of the place you want to know about. | |
func Forecast(city, condition string) string { | |
CurrentLocation, CurrentCondition = city, condition | |
return CurrentLocation + " - current weather condition: " + CurrentCondition | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment