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 partyrobot | |
import "fmt" | |
// Welcome greets a person by name. | |
func Welcome(name string) string { | |
return fmt.Sprintf("Welcome to my party, %s!", name) | |
} | |
// HappyBirthday wishes happy birthday to the birthday person and exclaims their age. |
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 techpalace | |
import "strings" | |
// WelcomeMessage returns a welcome message for the customer. | |
func WelcomeMessage(customer string) string { | |
return "Welcome to the Tech Palace, " + strings.ToUpper(customer) | |
panic("Please implement the WelcomeMessage() function") | |
} |
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 cars | |
// CalculateWorkingCarsPerHour calculates how many working cars are | |
// produced by the assembly line every hour. | |
func CalculateWorkingCarsPerHour(productionRate int, successRate float64) float64 { | |
var onePercentProductionRate float64 = float64(productionRate) / 100 | |
var workingCarsPerHour float64 = onePercentProductionRate * successRate | |
return workingCarsPerHour | |
panic("CalculateWorkingCarsPerHour not implemented") | |
} |
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. |
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 annalyn | |
// CanFastAttack can be executed only when the knight is sleeping. | |
func CanFastAttack(knightIsAwake bool) bool { | |
canFastAttack := !knightIsAwake | |
return canFastAttack | |
panic("Please implement the CanFastAttack() function") | |
} | |
// CanSpy can be executed if at least one of the characters is awake. |
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 lasagna | |
const OvenTime = 40 | |
const layerPreparationTime = 2 | |
// RemainingOvenTime retorna os minutos restantes com base nos minutos `atual` já no forno. | |
func RemainingOvenTime(actualMinutesInOven int) int { | |
remainingOvenTime := OvenTime - actualMinutesInOven | |
return remainingOvenTime | |
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 greeting | |
// HelloWorld greets the world. | |
func HelloWorld() string { | |
return "Hello, World!" | |
} |
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
{ | |
"files.autoSave": "afterDelay", | |
"editor.fontFamily": "JetBrains Mono", | |
"workbench.colorTheme": "Min Dark", | |
"editor.lineHeight": 1.8, | |
"editor.rulers": [80, 120], | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.renderLineHighlight": "gutter", | |
"editor.fontLigatures": true, | |
"workbench.editor.labelFormat": "short", |