Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails #2602

Closed
bitfield opened this issue Feb 12, 2023 · 2 comments
Closed

Fails #2602

bitfield opened this issue Feb 12, 2023 · 2 comments

Comments

@bitfield
Copy link
Contributor

package lasagna

import "fmt"

// TODO: define the 'PreparationTime()' function
func PreparationTime(layers []string, avPrepTime int) int {
if avPrepTime == 0 {
return 4
}
return len(layers) * avPrepTime
}

// TODO: define the 'Quantities()' function
func Quantities(layers []string) (noodles int, sauce float64) {
noodleWeight := 50
sauceAmount := 0.2
for i := 0; i < len(layers); i++ {
if layers[i] == "noodles" {
noodles += noodleWeight
}
if layers[i] == "sauce" {
sauce += sauceAmount
}
}
return noodles, sauce
}

// TODO: define the 'AddSecretIngredient()' function
func AddSecretIngredient(friendsList, myList []string) {
myList[len(myList)-1] = friendsList[len(friendsList)-1]
}

// TODO: define the 'ScaleRecipe()' function
func ScaleRecipe(quantities []float64, portions int) []float64 {
scaledAmounts := make([]float64, len(quantities))
fmt.Printf("portions %v", portions/2)
for i := 0; i < len(quantities); i++ {
scaledAmounts[i] = quantities[i] * float64(portions) / 2
}
fmt.Printf("portionList %v", scaledAmounts)

return scaledAmounts

}

@github-actions
Copy link
Contributor

Hello. Thanks for opening an issue on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this issue has been pre-approved, please link back to this issue on the forum thread and a maintainer or staff member will reopen it.

@junedev
Copy link
Member

junedev commented Feb 12, 2023

Looks like it is related to this known issue: exercism/go-test-runner#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants