Écrire une fonction qui prend un `int` minimum et un `int` maximum comme paramètres. Cette fonction retournes une slice d'`int` avec toutes les valeurs comprises entre le minimum et le maximum.
Écrire une fonction qui prend un `int` minimum et un `int` maximum comme paramètres. Cette fonction retournes une slice d'`int` avec toutes les valeurs comprises entre le minimum et le maximum.
@ -10,7 +10,7 @@ Si le minimum est supérieur ou égal au maximum, une slice `nil` est retournée
`make` n'est pas autorisé pour cet exercice.
`make` n'est pas autorisé pour cet exercice.
## Fonction attendue
### Fonction attendue
```go
```go
func AppendRange(min, max int) []int {
func AppendRange(min, max int) []int {
@ -18,7 +18,7 @@ func AppendRange(min, max int) []int {
}
}
```
```
## Utilisation
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
- Write a [function](TODO-LINK) that simulates the behaviour of the `Atoi` function in Go. `Atoi` transforms a number represented as a `string` in a number represented as an `int`.
- Write a [function](TODO-LINK) that simulates the behaviour of the `Atoi` function in Go. `Atoi` transforms a number represented as a `string` in a number represented as an `int`.
@ -10,7 +10,7 @@
- This function will **only** have to return the `int``nbr`. For this exercise the `error` return of atoi is not required.
- This function will **only** have to return the `int``nbr`. For this exercise the `error` return of atoi is not required.
## Format required
### Format required
```go
```go
func Atoi(s string) int {
func Atoi(s string) int {
@ -18,7 +18,7 @@ func Atoi(s string) int {
}
}
```
```
## Usage
### Usage
Here is a possible [program](TODO-LINK) to test your function :
Here is a possible [program](TODO-LINK) to test your function :
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
@ -10,7 +10,7 @@
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
## Fonction attendue
### Fonction attendue
```go
```go
func Atoi(s string) int {
func Atoi(s string) int {
@ -18,7 +18,7 @@ func Atoi(s string) int {
}
}
```
```
## Utilisation
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
- Write a function that simulates the behaviour of the atoi function in Go. Atoi transforms a number defined as a `string` in a number defined as an `int`.
- Write a function that simulates the behaviour of the atoi function in Go. Atoi transforms a number defined as a `string` in a number defined as an `int`.
@ -10,7 +10,7 @@
- This function will **only** have to return the `int``nbr`. For this exercise the `error` return of atoi is not required.
- This function will **only** have to return the `int``nbr`. For this exercise the `error` return of atoi is not required.
## Expected function
### Expected function
```go
```go
func BasicAtoi(s string) int {
func BasicAtoi(s string) int {
@ -18,7 +18,7 @@ func BasicAtoi(s string) int {
}
}
```
```
## Usage
### Usage
Here is a possible [program](TODO-LINK) to test your function :
Here is a possible [program](TODO-LINK) to test your function :
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
@ -10,7 +10,7 @@
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
## Fonction attendue
### Fonction attendue
```go
```go
func BasicAtoi(s string) int {
func BasicAtoi(s string) int {
@ -18,7 +18,7 @@ func BasicAtoi(s string) int {
}
}
```
```
## Utilisation
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
- Write a function that simulates the behaviour of the atoi function in Go. Atoi transforms a number defined as a `string` in a number defined as an `int`.
- Write a function that simulates the behaviour of the atoi function in Go. Atoi transforms a number defined as a `string` in a number defined as an `int`.
@ -10,7 +10,7 @@
- This function will **only** have to return the `int``nbr`. For this exercise the `error` return of atoi is not required.
- This function will **only** have to return the `int``nbr`. For this exercise the `error` return of atoi is not required.
## Expected Function
### Expected Function
```go
```go
func BasicAtoi2(s string) int {
func BasicAtoi2(s string) int {
@ -18,7 +18,7 @@ func BasicAtoi2(s string) int {
}
}
```
```
## Usage
### Usage
Here is a possible [program](TODO-LINK) to test your function :
Here is a possible [program](TODO-LINK) to test your function :
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
@ -10,7 +10,7 @@
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
## Fonction attendue
### Fonction attendue
```go
```go
func BasicAtoi2(s string) int {
func BasicAtoi2(s string) int {
@ -18,7 +18,7 @@ func BasicAtoi2(s string) int {
}
}
```
```
## Utilisation
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Create a file `countfiles.sh`, which will print the number **(and only the number)** of regular files and folders cointaned in the current directory and its sub-folders :
Create a file `countfiles.sh`, which will print the number **(and only the number)** of regular files and folders cointaned in the current directory and its sub-folders :
Créer un fichier `countfiles.sh`, qui affichera will lenombre **(et seulement le nombre)** de fichiers réguliers et répertoires contenu dans le répertoire courant et ses sous-répertoires :
Créer un fichier `countfiles.sh`, qui affichera will lenombre **(et seulement le nombre)** de fichiers réguliers et répertoires contenu dans le répertoire courant et ses sous-répertoires :
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères alphanumériques, et qui retourne `false` autrement.
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères alphanumériques, et qui retourne `false` autrement.
## Fonction attendue
### Fonction attendue
```go
```go
func IsAlpha(str string) bool {
func IsAlpha(str string) bool {
@ -12,7 +12,7 @@ func IsAlpha(str string) bool {
}
}
```
```
## Utilisation
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères minuscules, et qui retourne `false` autrement.
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères minuscules, et qui retourne `false` autrement.
## Fonction attendue
### Fonction attendue
```go
```go
func IsLower(str string) bool {
func IsLower(str string) bool {
@ -12,7 +12,7 @@ func IsLower(str string) bool {
}
}
```
```
## Utilisation
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Write a [function](TODO-LINK) that prints `'T'` (true) on a single line if the `int` passed as parameter is negative, otherwise it prints `'F'` (false).
Write a [function](TODO-LINK) that prints `'T'` (true) on a single line if the `int` passed as parameter is negative, otherwise it prints `'F'` (false).
## Expected function
### Expected function
```go
```go
func IsNegative(nb int) {
func IsNegative(nb int) {
@ -12,7 +12,7 @@ func IsNegative(nb int) {
}
}
```
```
## Usage
### Usage
Here is a possible [program](TODO-LINK) to test your function :
Here is a possible [program](TODO-LINK) to test your function :
Écrire une [fonction](TODO-LINK) qui affiche `'T'` (true) sur une seule ligne si l'`int` passé en paramètre est négatif, sinon elle affiche `'F'` (false).
Écrire une [fonction](TODO-LINK) qui affiche `'T'` (true) sur une seule ligne si l'`int` passé en paramètre est négatif, sinon elle affiche `'F'` (false).
## Fonction attendue
### Fonction attendue
```go
```go
func IsNegative(nb int) {
func IsNegative(nb int) {
@ -12,7 +12,7 @@ func IsNegative(nb int) {
}
}
```
```
## Utilisation
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères numériques, et qui retourne `false` autrement.
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères numériques, et qui retourne `false` autrement.
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
## Fonction attendue
### Fonction attendue
```go
```go
func IsUpper(str string) bool {
func IsUpper(str string) bool {
@ -12,7 +12,7 @@ func IsUpper(str string) bool {
}
}
```
```
## Utilisation
### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
Write a function `ListAt` that haves one pointer to the list, `l`, and an `int` as parameters. This function should print a `Node` of the linked list, depending on the number, `nbr`.
Write a function `ListAt` that haves one pointer to the list, `l`, and an `int` as parameters. This function should print a `Node` of the linked list, depending on the number, `nbr`.