随笔分类 -  Kata

摘要:题目: Description: Write a function called repeatStr which repeats the given string string exactly n times. repeatStr(6, "I") // "IIIIII" repeatStr(5, " 阅读全文
posted @ 2022-01-05 22:18 bcaixl 阅读(25) 评论(0) 推荐(0)
摘要:题目: Complete the function which takes two arguments and returns all numbers which are divisible by the given divisor. First argument is an array of nu 阅读全文
posted @ 2019-10-12 09:58 bcaixl 阅读(165) 评论(0) 推荐(0)
摘要:题目: Summation Write a program that finds the summation of every number from 1 to num. The number will always be a positive integer greater than 0. For 阅读全文
posted @ 2019-10-10 21:51 bcaixl 阅读(193) 评论(0) 推荐(0)
摘要:题目: When you sign up for an account somewhere, some websites do not actually store your password in their databases. Instead, they will transform your 阅读全文
posted @ 2019-09-29 09:55 bcaixl 阅读(243) 评论(0) 推荐(0)
摘要:题目: Consider an array of sheep where some sheep may be missing from their place. We need a function that counts the number of sheep present in the arr 阅读全文
posted @ 2019-09-27 09:24 bcaixl 阅读(357) 评论(0) 推荐(0)
摘要:题目: 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 ab 阅读全文
posted @ 2019-09-24 12:08 bcaixl 阅读(545) 评论(0) 推荐(0)
摘要:题目: Create a method that takes an array/list as an input, and outputs the index at which the sole odd number is located. This method should work with 阅读全文
posted @ 2019-09-23 17:33 bcaixl 阅读(200) 评论(0) 推荐(0)
摘要:题目: Complete the square sum function so that it squares each number passed into it and then sums the results together. For example, for [1, 2, 2] it s 阅读全文
posted @ 2019-09-20 11:04 bcaixl 阅读(336) 评论(0) 推荐(0)
摘要:题目: Scenario Now that the competition gets tough it will Sort out the men from the boys . Men are the Even numbers and Boys are the odd Task Given an  阅读全文
posted @ 2019-09-19 14:15 bcaixl 阅读(202) 评论(0) 推荐(0)
摘要:题目: Modify the spacify function so that it returns the given string with spaces insertedbetween each character. 解题办法: 用时:5分59秒 知识点: 1、str转化为list:list( 阅读全文
posted @ 2019-09-18 14:32 bcaixl 阅读(206) 评论(0) 推荐(0)
摘要:题目: You are given an input string. For each symbol in the string if it's the first character occurence, replace it with a '1', else replace it with th 阅读全文
posted @ 2019-09-17 11:58 bcaixl 阅读(249) 评论(0) 推荐(0)
摘要:题目: Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string). Examples: 解题办法: 阅读全文
posted @ 2019-09-16 10:04 bcaixl 阅读(213) 评论(0) 推荐(0)
摘要:题目: Your task is to add up letters to one letter. The function will be given a variable amount of arguments, each one being a letter to add. Notes: Le 阅读全文
posted @ 2019-09-12 17:04 bcaixl 阅读(347) 评论(0) 推荐(0)
摘要:题目: Create a function that accepts dimensions, of Rows x Columns, as parameters in order to create a multiplication table sized according to the given 阅读全文
posted @ 2019-09-11 10:34 bcaixl 阅读(281) 评论(0) 推荐(0)
摘要:题目: You probably know the "like" system from Facebook and other pages. People can "like" blog posts, pictures or other items. We want to create the te 阅读全文
posted @ 2019-09-10 16:30 bcaixl 阅读(274) 评论(0) 推荐(0)
摘要:题目: There is a queue for the self-checkout tills at the supermarket. Your task is write a function to calculate the total time required for all the cu 阅读全文
posted @ 2019-09-09 15:07 bcaixl 阅读(374) 评论(0) 推荐(0)
摘要:原题: I always thought that my old friend John was rather richer than he looked, but I never knew exactly how much money he actually had. One day (as I 阅读全文
posted @ 2019-09-08 14:48 bcaixl 阅读(240) 评论(0) 推荐(0)
摘要:题目: The new "Avengers" movie has just been released! There are a lot of people at the cinema box office standing in a huge line. Each of them has a si 阅读全文
posted @ 2019-09-06 14:58 bcaixl 阅读(186) 评论(0) 推荐(0)
摘要:原题: A perfect power is a classification of positive integers: In mathematics, a perfect power is a positive integer that can be expressed as an intege 阅读全文
posted @ 2019-09-05 16:50 bcaixl 阅读(463) 评论(0) 推荐(0)
摘要:原题: This time we want to write calculations using functions and get the results. Let's have a look at some examples: Requirements: There must be a fun 阅读全文
posted @ 2019-09-05 12:03 bcaixl 阅读(428) 评论(0) 推荐(0)