From 256b4709927567987d5bc77ec8bd31f420762146 Mon Sep 17 00:00:00 2001 From: jotapero Date: Thu, 20 Oct 2022 16:36:16 +0100 Subject: [PATCH] docs(getAlpha): fix subjects - fixed both files indentation and grammar --- subjects/count-character/README.md | 19 ++++++++++--------- subjects/get-alpha/README.md | 6 +++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/subjects/count-character/README.md b/subjects/count-character/README.md index 71b8b3ff..6b1e94a6 100644 --- a/subjects/count-character/README.md +++ b/subjects/count-character/README.md @@ -1,16 +1,17 @@ -## Count-Characters +## countcharacter ### Instructions -Write a function that, given a string and a character as arguments, returns an int representing the number of times the character appears in the string. +Write a function that, given a `string` and a character as arguments, returns an `int` representing the number of times the character appears in the string. -- if the character is not in the string return 0 -- if the string is empty return 0 +- If the character is not in the string return 0 +- If the string is empty return 0 ### Expected Function ```go func CountChar(str string, c rune) int { + } ``` @@ -24,14 +25,14 @@ package main import "fmt" func main() { - fmt.Println(CountChar("Hello World", 'l')) - fmt.Println(CountChar("5 balloons",5)) - fmt.Println(CountChar(" ", ' ')) //The first argument contains space and tabulation. - fmt.Println(CountChar("The 7 deadly sins", '7')) + fmt.Println(piscine.CountChar("Hello World", 'l')) + fmt.Println(piscine.CountChar("5 balloons", 5)) + fmt.Println(piscine.CountChar(" ", ' ')) // The first argument contains space and tabulation. + fmt.Println(piscine.CountChar("The 7 deadly sins", '7')) } ``` -And its output : +And its output: ```console $ go run . diff --git a/subjects/get-alpha/README.md b/subjects/get-alpha/README.md index c81d7d9e..48679ca2 100644 --- a/subjects/get-alpha/README.md +++ b/subjects/get-alpha/README.md @@ -1,12 +1,12 @@ -# getalpha +## getalpha ### Instructions -write a program that takes an integer [0-127] in parameter and returns the char that match the index of the integer in the ASCII table follwed by newline, follwed by newline. +Write a program that takes an `int` [0-127] as an argument and returns the corresponding ASCII table character, followed by newline. - If the integer above 127 or less than 0 returns newline. - If it's not a number returns newline. -- If tge number of arguments above 1 return newline. +- If the number of arguments is above 1 return newline. ### Usage