随笔分类 - Kata
摘要:题目: Description: Write a function called repeatStr which repeats the given string string exactly n times. repeatStr(6, "I") // "IIIIII" repeatStr(5, "
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: When you sign up for an account somewhere, some websites do not actually store your password in their databases. Instead, they will transform your
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: Modify the spacify function so that it returns the given string with spaces insertedbetween each character. 解题办法: 用时:5分59秒 知识点: 1、str转化为list:list(
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string). Examples: 解题办法:
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: Create a function that accepts dimensions, of Rows x Columns, as parameters in order to create a multiplication table sized according to the given
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: 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
阅读全文
摘要:原题: 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
阅读全文
摘要:题目: 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
阅读全文
摘要:原题: 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
阅读全文
摘要:原题: 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
阅读全文

浙公网安备 33010602011771号