08 2020 档案
摘要:pyschools Topic 5: Question 12题目:分解质因素Given a positive integer, write a function that computes the prime factors that can be multplied together to get back the same integer.def primeFactorization(num)...
阅读全文
摘要:pyschools Topic 6: Question 11题目:矩阵乘法Write a function that does matrix multiplication. The product of a mxn matrix with a nxp matrix results in a mxp matrix. A mxn matrix, with m rows and n column...
阅读全文
摘要:pyschools Topic 2: Question 9 题目:给定一组整数,获取其个位数之和Write a function getSumOfLastDigits() that takes in a list of positive numbers and returns the sum of all the last digits in the list.def getSumOfLastD...
阅读全文
摘要:pyschools Topic 8: Question 7的题目:给定一个单词,输出字母及字母出现次数Write a function countLetters(word) that takes in a word as argument and returns a dictionary that counts the number of times each letter appears.pyt...
阅读全文