Browse Source

slight modf of alphacount en vs and placeholder of alphacoutn subject fr to translate later

content-update
Christopher Fremond 5 years ago committed by Christopher Fremond
parent
commit
7e104bb322
  1. 2
      subjects/alphacount.en.md
  2. 44
      subjects/alphacount.fr.md

2
subjects/alphacount.en.md

@ -5,6 +5,8 @@
Write a function that counts only the letters of a `string` and that returns that count.
White spaces or any other characters should not be counted.
The letters are only the ones from the latin alphabet.
### Expected function
```go

44
subjects/alphacount.fr.md

@ -0,0 +1,44 @@
## alphacount
### Instructions
Write a function that counts only the letters of a `string` and that returns that count.
White spaces or any other characters should not be counted.
The letters are only the ones from the latin alphabet.
### Expected function
```go
func AlphaCount(str string) int {
}
```
### Usage
Here is a possible [program](TODO-LINK) to test your function :
```go
package main
import (
"fmt"
piscine ".."
)
func main() {
str := "Hello 78 World! 4455 /"
nb := piscine.AlphaCount(str)
fmt.Println(nb)
}
```
And its output :
```console
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
10
student@ubuntu:~/piscine-go/test$
```
Loading…
Cancel
Save