From c5193e9d82393f807c5ca1e6d11e776961fc0878 Mon Sep 17 00:00:00 2001 From: Hamza elkhatri <40549481+Hamzaelkhatri@users.noreply.github.com> Date: Tue, 5 Jul 2022 18:10:30 +0100 Subject: [PATCH] change name of function and name of subject --- subjects/isthesquareachild/README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/subjects/isthesquareachild/README.md b/subjects/isthesquareachild/README.md index 76f90906..cdeabc8c 100644 --- a/subjects/isthesquareachild/README.md +++ b/subjects/isthesquareachild/README.md @@ -1,14 +1,14 @@ -## is-the-square-a-child +## is-square ### Instructions -Write a function `IsTheSquareAChild` that takes two numbers and returns `true` if the second number is the square of the first and `false` otherwise. -- The function should return `false` if the number is negative. -- Check only if the first parameter is the square of the second one. +Write a function `isSquare` that takes two numbers and returns `true` if the second number is the square of the first and `false` otherwise. +- The function should return `false` if any of the parameters are negative +- Check only if the second parameter is the square of the first one. ### Expected Function ```go -func IsTheSquareAChild(number int, square int) bool { +func isSquare(number int, square int) bool { // your code here } ``` @@ -23,14 +23,14 @@ package main import "fmt" func main(){ - fmt.Println(IsTheSquareAChild(4, 16)) - fmt.Println(IsTheSquareAChild(5, 23)) - fmt.Println(IsTheSquareAChild(5, 25)) - fmt.Println(IsTheSquareAChild(2, 27)) - fmt.Println(IsTheSquareAChild(6, 36)) - fmt.Println(IsTheSquareAChild(-10, 100)) - fmt.Println(IsTheSquareAChild(100,10)) - fmt.Println(IsTheSquareAChild(8, -64)) + fmt.Println(isSquare(4, 16)) + fmt.Println(isSquare(5, 23)) + fmt.Println(isSquare(5, 25)) + fmt.Println(isSquare(2, 27)) + fmt.Println(isSquare(6, 36)) + fmt.Println(isSquare(-10, 100)) + fmt.Println(isSquare(100,10)) + fmt.Println(isSquare(8, -64)) } ```