Anıl Başaran (AnilBASARAN)

AnilBASARAN

Geek Repo

Company:Bilge E Ticaret LTD

Location:Turkey

Home Page:https://www.codewars.com/users/AnilBASARAN/badges/large

Twitter:@nlbsrn_anil

Github PK Tool:Github PK Tool

Anıl Başaran's repositories

codewars-8kyu-Holiday-VIII-Duty-Free

8kyu-Holiday VIII - Duty Free The purpose of this kata is to work out just how many bottles of duty free whiskey you would have to buy such that the saving over the normal high street price would effectively cover the cost of your holiday. You will be given the high street price (normPrice), the duty free discount (discount) and the cost of the holiday. For example, if a bottle cost £10 normally and the discount in duty free was 10%, you would save £1 per bottle. If your holiday cost £500, the answer you should return would be 500. All inputs will be integers. Please return an integer. Round down.

Language:JavaScriptStargazers:1Issues:0Issues:0

Shuffler

Made a shuffler

Language:JavaScriptStargazers:1Issues:0Issues:0

7kyu-Sum-of-Minimums-

7kyu-Sum of Minimums! Given a 2D ( nested ) list ( array, vector, .. ) of size m * n, your task is to find the sum of the minimum values in each row. For Example: [ [ 1, 2, 3, 4, 5 ] # minimum value of row is 1 , [ 5, 6, 7, 8, 9 ] # minimum value of row is 5 , [ 20, 21, 34, 56, 100 ] # minimum value of row is 20 ] So the function should return 26 because the sum of the minimums is 1 + 5 + 20 = 26. Note: You will always be given a non-empty list containing positive values.

Language:JavaScriptStargazers:0Issues:0Issues:0

8kyu-Reverse-List-Order

8kyu-Reverse List Order In this kata you will create a function that takes in a list and returns a list with the reverse order. Examples (Input -> Output) * [1, 2, 3, 4] -> [4, 3, 2, 1] * [9, 2, 0, 7] -> [7, 0, 2, 9]

Language:JavaScriptStargazers:0Issues:0Issues:0

8kyu-Volume-of-a-Cuboid

Bob needs a fast way to calculate the volume of a cuboid with three values: the length, width and height of the cuboid. Write a function to help Bob with this calculation.

Language:JavaScriptStargazers:0Issues:0Issues:0

8kyu-Welcome-to-the-City

Create a method sayHello/say_hello/SayHello that takes as input a name, city, and state to welcome a person. Note that name will be an array consisting of one or more values that should be joined together with one space between each, and the length of the name array in test cases will vary. Example: sayHello(['John', 'Smith'], 'Phoenix', 'Arizona') This example will return the string Hello, John Smith! Welcome to Phoenix, Arizona!

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-7kyu-Find-the-capitals

7kyu-Find the capitals Instructions Write a function that takes a single string (word) as argument. The function must return an ordered list containing the indexes of all capital letters in the string. Example Test.assertSimilar( capitals('CodEWaRs'), [0,3,4,6] );

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-7kyu-Find-the-stray-number

7kyu- Find the stray number You are given an odd-length array of integers, in which all of them are the same, except for one single number. Complete the method which accepts such an array, and returns that single different number. The input array will always be valid! (odd-length >= 3) Examples [1, 1, 2] ==> 2 [17, 17, 3, 17, 17, 17, 17] ==> 3

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-7kyu-Remove-anchor-from-URL

7kyu-Remove anchor from URL Complete the function/method so that it returns the url with anything after the anchor (#) removed. Examples "www.codewars.com#about" --> "www.codewars.com" "www.codewars.com?page=1" -->"www.codewars.com?page=1"

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-7kyu-Row-Weights

Scenario Several people are standing in a row divided into two teams. The first person goes into team 1, the second goes into team 2, the third goes into team 1, and so on. Task Given an array of positive integers (the weights of the people), return a new array/tuple of two integers, where the first one is the total weight of team 1, and the second one is the total weight of team 2.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-7kyu-Thinkful---String-Drills-Repeater

Write a function named repeater() that takes two arguments (a string and a number), and returns a new string where the input string is repeated that many times. Example: (Input1, Input2 --> Output) "a", 5 --> "aaaaa"

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu--Remove-n-exclamation-marks-in-the-sentence-from-left-to-right

8kyu- Exclamation marks series #6: Remove n exclamation marks in the sentence from left to right Description: Remove n exclamation marks in the sentence from left to right. n is positive integer. Examples remove("Hi!",1) === "Hi" remove("Hi!",100) === "Hi" remove("Hi!!!",1) === "Hi!!" remove("Hi!!!",100) === "Hi" remove("!Hi",1) === "Hi" remove("!Hi!",1) === "Hi!" remove("!Hi!",100) === "Hi" remove("!!!Hi !!hi!!! !hi",1) === "!!Hi !!hi!!! !hi" remove("!!!Hi !!hi!!! !hi",3) === "Hi !!hi!!! !hi" remove("!!!Hi !!hi!!! !hi",5) === "Hi hi!!! !hi" remove("!!!Hi !!hi!!! !hi",100) === "Hi hi hi"

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Alan-Partridge-II-AppleTurnover

8kyu-Alan Partridge II - Apple Turnover Alan is known for referring to the temperature of the apple turnover as 'Hotter than the sun!'. According to space.com the temperature of the sun's corona is 2,000,000 degrees C, but we will ignore the science for now. Your job is simple, if (x) squared is more than 1000, return 'It's hotter than the sun!!', else, return 'Help yourself to a honeycomb Yorkie for the glovebox.'. X will be a valid integer number. X will be either a number or a string. Both are valid.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Beginner---Reduce-but-Grow

Given a non-empty array of integers, return the result of multiplying the values together in order. Example: [1, 2, 3, 4] => 1 * 2 * 3 * 4 = 24

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Difference-of-Volumes-of-Cuboids

8kyu-Difference of Volumes of Cuboids In this simple exercise, you will create a program that will take two lists of integers, a and b. Each list will consist of 3 positive integers above 0, representing the dimensions of cuboids a and b. You must find the difference of the cuboids' volumes regardless of which is bigger. For example, if the parameters passed are ([2, 2, 3], [5, 4, 1]), the volume of a is 12 and the volume of b is 20. Therefore, the function should return 8. Your function will be tested with pre-made examples as well as random ones. If you can, try writing it in one line of code.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Enumerable-Magic25-Take-the-First-N-Elements

8kyu- Enumerable Magic #25 - Take the First N Elements Create a function that accepts a list/array and a number n, and returns a list/array of the first n elements from the list/array.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Enumerable-Magic3-Does-My-List-Include-This

8kyu-Enumerable Magic #3 - Does My List Include This? Create a method that accepts a list and an item, and returns true if the item belongs to the list, otherwise false.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Function-2-squaring-an-argument

8kyu- Function 2 - squaring an argument Now you have to write a function that takes an argument and returns the square of it.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Fundamentals-Return

Make multiple functions that will return the sum, difference, modulus, product, quotient, and the exponent respectively. Please use the following function names: addition = add multiply = multiply division = divide (both integer and float divisions are accepted) modulus = mod exponential = exponent subtraction = subt Note: All math operations will be: a (operation) b

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-How-many-lightsabers-do-you-own

8kyu-How many lightsabers do you own? Inspired by the development team at Vooza, write the function that accepts the name of a programmer, and returns the number of lightsabers owned by that person. The only person who owns lightsabers is Zach, by the way. He owns 18, which is an awesome number of lightsabers. Anyone else owns 0. Note: your function should have a default parameter. For example(Input --> Output): "anyone else" --> 0 "Zach" --> 18

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Keep-up-the-hoop

8kyu-Keep up the hoop Alex just got a new hula hoop, he loves it but feels discouraged because his little brother is better than him Write a program where Alex can input (n) how many times the hoop goes round and it will return him an encouraging message :) If Alex gets 10 or more hoops, return the string "Great, now move on to tricks". If he doesn't get 10 hoops, return the string "Keep at it until you get it".

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Pre-FizzBuzz-Workout

8kyu- Pre-FizzBuzz Workout #1 This is the first step to understanding FizzBuzz. Your inputs: a positive integer, n, greater than or equal to one. n is provided, you have NO CONTROL over its value. Your expected output is an array of positive integers from 1 to n (inclusive). Your job is to write an algorithm that gets you from the input to the output.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Remove-duplicates-from-list

8kyu-Remove duplicates from list Define a function that removes duplicates from an array of numbers and returns it as a result. The order of the sequence has to stay the same.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Reversing-Words-in-a-String

8kyu-Reversing-Words-in-a-String You need to write a function that reverses the words in a given string. A word can also fit an empty string. If this is not clear enough, here are some examples: As the input may have trailing spaces, you will also need to ignore unneccesary whitespace. Example (Input --> Output) "Hello World" --> "World Hello" "Hi There." --> "There. Hi"

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Take-the-Derivative

8kyu-Take the Derivative This function takes two numbers as parameters, the first number being the coefficient, and the second number being the exponent. Your function should multiply the two numbers, and then subtract 1 from the exponent. Then, it has to print out an expression (like 28x^7). "^1" should not be truncated when exponent = 2. For example: derive(7, 8) In this case, the function should multiply 7 and 8, and then subtract 1 from 8. It should output "56x^7", the first number 56 being the product of the two numbers, and the second number being the exponent minus 1. derive(7, 8) --> this should output "56x^7" derive(5, 9) --> this should output "45x^8" Notes: The output of this function should be a string The exponent will never be 1, and neither number will ever be 0

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-The-Wide-Mouthed-frog

8kyu The Wide-Mouthed frog! The wide-mouth frog is particularly interested in the eating habits of other creatures. He just can't stop asking the creatures he encounters what they like to eat. But, then he meets the alligator who just LOVES to eat wide-mouthed frogs! When he meets the alligator, it then makes a tiny mouth. Your goal in this kata is to create complete the mouth_size method this method takes one argument animal which corresponds to the animal encountered by the frog. If this one is an alligator (case-insensitive) return small otherwise return wide

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Thinkful-Logic-Drills-Traffic-light

8kyu-Thinkful - Logic Drills: Traffic light You're writing code to control your town's traffic lights. You need a function to handle each change from green, to yellow, to red, and then to green again. Complete the function that takes a string as an argument representing the current state of the light and returns a string representing the state the light should change to. For example, update_light('green') should return 'yellow'. Note: Use "" instead of '' in C++.

Language:JavaScriptStargazers:0Issues:0Issues:0

codewars-8kyu-Will-there-be-enough-space

8kyu-Will there be enough space? The Story: Bob is working as a bus driver. However, he has become extremely popular amongst the city's residents. With so many passengers wanting to get aboard his bus, he sometimes has to face the problem of not enough space left on the bus! He wants you to write a simple program telling him if he will be able to fit all the passengers. Task Overview: You have to write a function that accepts three parameters: cap is the amount of people the bus can hold excluding the driver. on is the number of people on the bus excluding the driver. wait is the number of people waiting to get on to the bus excluding the driver. If there is enough space, return 0, and if there isn't, return the number of passengers he can't take. Usage Examples: cap = 10, on = 5, wait = 5 --> 0 # He can fit all 5 passengers cap = 100, on = 60, wait = 50 --> 10 # He can't fit 10 of the 50 waiting

Language:JavaScriptStargazers:0Issues:0Issues:0

Remote-Sensing-Education-Countdown

this is a basic countown timer for my canada departure :D enjoy

Language:CSSStargazers:0Issues:0Issues:0

timer

count down timer

Language:CSSStargazers:0Issues:0Issues:0