write a function
写一个函数
编写一个函数
写个函数
Write a function to print the odd numbers from 1 to 99.Write a function that checks whether an element occurs in a list.For example, suppose we wanted to write a function to add x and y. Write function that reverses a list, preferably in place.Also you can simply use list comprehension instead of writing a function . Combinations with other parts of speech
写一个函数 shorten(text,n)处理文本,省略文本中前n个最频繁出现的词。Write a function shorten(text, n) to process a text, omitting the n most frequently occurring words of the text. 写一个函数 unknown(),以一个URL为参数,返回一个那个网页出现的未知词链表。Write a function unknown() that takes a URL as its argument, and returns a list of unknown words that occur on that webpage. 写一个函数 ,通过比较它们的原始值来比较两个Rank值。Write a function that compares two Rank values by comparing their raw values.给定一个整数,写一个函数 来判断它是否是一个3的幂次方. Given an integer, write a function to determine if it is a power of two. 再举一例,我们可以写一个函数 ,其打印一个字符串n次。 As another example, we can write a function that prints a string n times. Given an integer, write a function to determine if it is a power of two. 写一个函数 ,从一个词典中找出最频繁的连续字段对(如:ps后面往往是pt)。Write a function that takes a lexicon and finds which pairs of consecutive fields are most frequent(e.g., ps is often followed by pt). 写一个函数 ucFirst(str),并返回首字母大写的字符串str,例如:.Write a function ucFirst(str) that returns the string str with the uppercased first character, for instance. 写一个函数 novel10(text)输出所有在一个文本最后10%出现而之前没有遇到过的词。Write a function novel10(text) that prints any word that appeared in the last 10% of a text that had not been encountered earlier. 写一个函数 ,添加一个新的字段syl,计数一个词中的音节数。Write a function to add a new field syl which givesa count of the number of syllables in the word.When you have written the same code 3 times, write a function . 有时候,写一个函数 或数据类型时,我们可能希望它可以作为多种类型的工作参数。 Sometimes, when writing a function or data type, we may want it to work for multiple types of arguments. 我们可以使用map_to_range和curried_pow来计算2的前10个幂,而不是专门写一个函数 :. We can use map_to_range and curried_pow to compute the first ten powers of two, rather than specifically writing a function to do so. 我们也可以写一个函数 将既存区域合并为更大更复杂的区域。 We can also write functions that combine existing regions into larger, complex regions. 写一个函数 ,计算两个数字列表形式的数值的和、差与积(返回一个新的数字列表)。Write functions that add, subtract, and multiply two numbers in their digit-list representation(and return a new digit list). 我们需要写一个函数 MatrixChainOrder()返回这个矩阵连相乘最小的运算次数。 We need to write a function MatrixChainOrder that should return the minimum number of multiplications needed to multiply the chain. For example, suppose we wanted to write a function to add x and y. I spent 30 minutes to write a function , 2 hours to make it work. 写一个函数 decode()来处理文本,随机替换词汇为它们的Gematria等值的词,以发现文本的“隐藏的含义”。Write a function decode() to process a text, randomly replacing words with their Gematria equivalents, in order to discover the"hidden meaning" of the text. 写一个函数 filterRangeInPlace(arr,a,b)获取一个数组arr,并从中除去a和b区间以外的所有值。Write a function filterRangeInPlace(arr, a, b) that gets an array arr and removes from it all values except those that are between a and b. 写一个函数 处理一个词链表(含重复项),返回一个按照频率递减排序的词链表(没有重复项)。Write a function that takes a list of words(containing duplicates) and returns a list of words(with no duplicates) sorted by decreasing frequency. Write a function that returns the repeated number.
Display more examples
Results: 27 ,
Time: 0.0146