AnilBASARAN
Geomatics Engineer, E- Commerce Company Co-founder, Culinary art Graduate & Chef #100dev
Bilge E Ticaret LTDTurkey
Pinned Repositories
8-kyu-remove-first-and-last-character
/* 8kyu Remove First and Last Character It's pretty straightforward. Your goal is to create a function that removes the first and last characters of a string. You're given one parameter, the original string. You don't have to worry with strings with less than two characters.
AnilBASARAN
Config files for my GitHub profile.
codewars-6-kyu-take-a-ten-minutes-walk
You live in the city of Cartesia where all roads are laid out in a perfect grid. You arrived ten minutes too early to an appointment, so you decided to take the opportunity to go for a short walk. The city provides its citizens with a Walk Generating App on their phones -- everytime you press the button it sends you an array of one-letter strings representing directions to walk (eg. ['n', 's', 'w', 'e']). You always walk only a single block for each letter (direction) and you know it takes you one minute to traverse one city block, so create a function that will return true if the walk the app gives you will take you exactly ten minutes (you don't want to be early or late!) and will, of course, return you to your starting point. Return false otherwise. Note: you will always receive a valid array (string in COBOL) containing a random assortment of direction letters ('n', 's', 'e', or 'w' only). It will never give you an empty array (that's not a walk, that's standing still!).
codewars-6kyu_Playing-with-digits
/* 6kyu-playing with digits Some numbers have funny properties. For example: 89 --> 8¹ + 9² = 89 * 1 695 --> 6² + 9³ + 5⁴= 1390 = 695 * 2 46288 --> 4³ + 6⁴+ 2⁵ + 8⁶ + 8⁷ = 2360688 = 46288 * 51 Given a positive integer n written as abcd... (a, b, c, d... being digits) and a positive integer p we want to find a positive integer k, if it exists, such that the sum of the digits of n taken to the successive powers of p is equal to k * n. In other words: Is there an integer k such as : (a ^ p + b ^ (p+1) + c ^(p+2) + d ^ (p+3) + ...) = n * k If it is the case we will return k, if not return -1. Note: n and p will always be given as strictly positive integers.
codewars-7-kyu-Categorize-New-Member
/* 7kyu Categorize New Member The Western Suburbs Croquet Club has two categories of membership, Senior and Open. They would like your help with an application form that will tell prospective members which category they will be placed. To be a senior, a member must be at least 55 years old and have a handicap greater than 7. In this croquet club, handicaps range from -2 to +26; the better the player the lower the handicap. Input Input will consist of a list of pairs. Each pair contains information for a single potential member. Information consists of an integer for the person's age and an integer for the person's handicap. Output Output will consist of a list of string values (in Haskell and C: Open or Senior) stating whether the respective member is to be placed in the senior or open category. Example input = [[18, 20], [45, 2], [61, 12], [37, 6], [21, 21], [78, 9]] output = ["Open", "Open", "Senior", "Open", "Open", "Senior"]
codewars-7-kyu-Friend-or-Foe
Make a program that filters a list of strings and returns a list with only your friends name in it. If a name has exactly 4 letters in it, you can be sure that it has to be a friend of yours! Otherwise, you can be sure he's not... Ex: Input = ["Ryan", "Kieran", "Jason", "Yous"], Output = ["Ryan", "Yous"] i.e. friend ["Ryan", "Kieran", "Mark"] `shouldBe` ["Ryan", "Mark"] Note: keep the original order of the names in the output.
codewars-7-kyu-Ones-and-Zeros
/*7 kyu Ones and Zeros Given an array of ones and zeroes, convert the equivalent binary value to an integer. Eg: [0, 0, 0, 1] is treated as 0001 which is the binary representation of 1. Examples: Testing: [0, 0, 0, 1] ==> 1 Testing: [0, 0, 1, 0] ==> 2 Testing: [0, 1, 0, 1] ==> 5 Testing: [1, 0, 0, 1] ==> 9 Testing: [0, 0, 1, 0] ==> 2 Testing: [0, 1, 1, 0] ==> 6 Testing: [1, 1, 1, 1] ==> 15 Testing: [1, 0, 1, 1] ==> 11 However, the arrays can have varying lengths, not just limited to 4.
codewars-7kyu-Binary-Addition
7kyu Binary Addition Implement a function that adds two numbers together and returns their sum in binary. The conversion can be done before, or after the addition. The binary number returned should be a string. Examples:(Input1, Input2 --> Output (explanation))) 1, 1 --> "10" (1 + 1 = 2 in decimal or 10 in binary) 5, 9 --> "1110" (5 + 9 = 14 in decimal or 1110 in binary)
codewars-7kyu-Highest-and-Lowest
/* 7kyu Highest and Lowest In this little assignment you are given a string of space separated numbers, and have to return the highest and lowest number. Examples highAndLow("1 2 3 4 5"); // return "5 1" highAndLow("1 2 -3 4 5"); // return "5 -3" highAndLow("1 9 3 4 -5"); // return "9 -5" Notes All numbers are valid Int32, no need to validate them. There will always be at least one number in the input string. Output string must be two numbers separated by a single space, and highest number is first
codewars-8kyu-Sum-without-highest-and-lowest-number
8kyu-Sum without highest and lowest number Sum all the numbers of a given array ( cq. list ), except the highest and the lowest element ( by value, not by index! ). The highest or lowest element respectively is a single element at each edge, even if there are more than one with the same value. Mind the input validation. Example { 6, 2, 1, 8, 10 } => 16 { 1, 1, 11, 2, 3 } => 6 Input validation If an empty value ( null, None, Nothing etc. ) is given instead of an array, or the given array is an empty list or a list with only 1 element, return 0.
AnilBASARAN's Repositories
AnilBASARAN/AnilBASARAN
Config files for my GitHub profile.
AnilBASARAN/181223-exercises
Exercises for group 181223
AnilBASARAN/axios
AnilBASARAN/axioss
AnilBASARAN/Patika-bill-gates-react
AnilBASARAN/patika-front-end-week6-asianKitchen
AnilBASARAN/patika-react-questionapp
AnilBASARAN/patika-react-starwars
AnilBASARAN/patika-reactive
AnilBASARAN/patika-sport-center
AnilBASARAN/patika-todolist
AnilBASARAN/pokemon-promise
AnilBASARAN/promise-chaining
AnilBASARAN/react-color-changer
AnilBASARAN/react-custom-hooks
AnilBASARAN/react-fruit-picker
AnilBASARAN/react-hangman
AnilBASARAN/react-hook-toggler
AnilBASARAN/react-lottery
AnilBASARAN/react-mosh
AnilBASARAN/react-number-list
AnilBASARAN/react-pokemon-game
AnilBASARAN/react-random-num-generator
AnilBASARAN/react-rollthedice
AnilBASARAN/react-routing-stuff
react-routing-stuff
AnilBASARAN/react-shopping-list
AnilBASARAN/react-slot_machine
AnilBASARAN/react-typescript-fading-buttons
AnilBASARAN/react-zen-quotes
AnilBASARAN/react-zenquotes-with-loader