docs: Rephrase instructions and remove import as per review

This commit is contained in:
estlop 2022-07-01 13:13:01 +01:00 committed by Dav Hojt
parent 5ebf4a257a
commit 402b138983
1 changed files with 5 additions and 8 deletions

View File

@ -2,7 +2,7 @@
### Instructions ### Instructions
Write a function that takes two single digit numbers as a string and returns the sum as an int. If the number of digits from one of the arguments is more than one, return 0. Write a function that takes two single digit numbers as a string and returns the sum as an int. The strings can only contain one digit which will be a positive or negative number from 0 to 9. Otherwise, you must return 0.
### Expected function ### Expected function
@ -19,15 +19,12 @@ Here is a possible program to test your function :
```go ```go
package main package main
import ( import "fmt"
"piscine"
"fmt"
)
func main() { func main() {
fmt.Println(piscine.Sum("1", "2")) fmt.Println(Sum("1", "2"))
fmt.Println(piscine.Sum("-4", "0")) fmt.Println(Sum("-4", "0"))
fmt.Println(piscine.Sum("7", "-3")) fmt.Println(Sum("7", "-3"))
} }
``` ```